Skip to content

Latest commit

 

History

History
115 lines (78 loc) · 4.65 KB

README.md

File metadata and controls

115 lines (78 loc) · 4.65 KB

Squareup

The Squareup framework was developed to support the platform for iOS-based devices. It provides full support for the squareup API, implementing all functions except for the terminal/online/auth API.

Requirements

  • Minimum Swift Version - 5.0
  • Deployment target - 13.0

Find an issues?

Please, let me know here

How to use?

import Squareup

// setup Squareup
let APPLICATION_ID = "<#APPLICATION_ID#>"
let SQUARE_LOCATION_ID = "<#SQUARE_LOCATION_ID#>"
let ACCESS_TOKEN = "<#ACCESS_TOKEN#>"
        
SquareupConfigurer.shared.setup(applicationId: APPLICATION_ID,
                                squareLocationId: SQUARE_LOCATION_ID,
                                type: .dev)

BusinessApi.locations.listLocations(accessToken: ACCESS_TOKEN, completion: { response in
    print(response.locations)
}) { error in
    print(error.localizedDescription)
}

More examples you can find in Tests folder.

Installation

CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
use_frameworks!

target 'MyApp' do
  pod 'Squareup', '~> 1.0.7'
end

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate Squareup into your project manually. Just copy all the folders and files from here

Squareup/Squareup/Classes/1.0

and paste them into your project.

Features