sezzle_client 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +611 -0
- data/Rakefile +8 -0
- data/docs/Address.md +14 -0
- data/docs/AllOfSessionCustomer.md +13 -0
- data/docs/AllOfSessionOrder.md +18 -0
- data/docs/Authorization.md +14 -0
- data/docs/BearerAuthenticationApi.md +52 -0
- data/docs/Body.md +8 -0
- data/docs/Body1.md +7 -0
- data/docs/Body2.md +6 -0
- data/docs/Body3.md +8 -0
- data/docs/Body4.md +8 -0
- data/docs/Capture.md +8 -0
- data/docs/Customer.md +13 -0
- data/docs/CustomerApi.md +269 -0
- data/docs/Discount.md +8 -0
- data/docs/Error.md +6 -0
- data/docs/ErrorInner.md +10 -0
- data/docs/InlineResponse200.md +10 -0
- data/docs/InlineResponse2001.md +15 -0
- data/docs/InlineResponse2002.md +9 -0
- data/docs/InlineResponse2003.md +15 -0
- data/docs/InlineResponse2004.md +8 -0
- data/docs/InlineResponse2005.md +12 -0
- data/docs/InlineResponse2006.md +7 -0
- data/docs/InlineResponse2007.md +14 -0
- data/docs/InlineResponse2008.md +8 -0
- data/docs/InlineResponse2009.md +7 -0
- data/docs/InlineResponse200Order.md +10 -0
- data/docs/InlineResponse201.md +9 -0
- data/docs/InlineResponse2011.md +10 -0
- data/docs/InlineResponse2011Order.md +9 -0
- data/docs/InlineResponse2011Tokenize.md +10 -0
- data/docs/InstallmentPlan.md +6 -0
- data/docs/Intent.md +6 -0
- data/docs/LineItem.md +10 -0
- data/docs/Link.md +9 -0
- data/docs/Notification.md +9 -0
- data/docs/Order.md +15 -0
- data/docs/OrderApi.md +391 -0
- data/docs/OrderAuthorization.md +12 -0
- data/docs/Payout.md +6 -0
- data/docs/PayoutInner.md +12 -0
- data/docs/Price.md +8 -0
- data/docs/Refund.md +8 -0
- data/docs/ReportsApi.md +230 -0
- data/docs/Session.md +10 -0
- data/docs/SessionApi.md +113 -0
- data/docs/SessionCancelUrl.md +8 -0
- data/docs/SessionStatus.md +8 -0
- data/docs/Token.md +10 -0
- data/docs/TokenApi.md +110 -0
- data/docs/Webhook.md +8 -0
- data/docs/WebhooksApi.md +157 -0
- data/git_push.sh +55 -0
- data/lib/sezzle_client.rb +90 -0
- data/lib/sezzle_client/api/bearer_authentication_api.rb +76 -0
- data/lib/sezzle_client/api/customer_api.rb +295 -0
- data/lib/sezzle_client/api/order_api.rb +430 -0
- data/lib/sezzle_client/api/reports_api.rb +253 -0
- data/lib/sezzle_client/api/session_api.rb +132 -0
- data/lib/sezzle_client/api/token_api.rb +126 -0
- data/lib/sezzle_client/api/webhooks_api.rb +178 -0
- data/lib/sezzle_client/api_client.rb +388 -0
- data/lib/sezzle_client/api_error.rb +57 -0
- data/lib/sezzle_client/configuration.rb +205 -0
- data/lib/sezzle_client/models/address.rb +297 -0
- data/lib/sezzle_client/models/all_of_session_customer.rb +260 -0
- data/lib/sezzle_client/models/all_of_session_order.rb +314 -0
- data/lib/sezzle_client/models/authorization.rb +281 -0
- data/lib/sezzle_client/models/body.rb +215 -0
- data/lib/sezzle_client/models/body_1.rb +206 -0
- data/lib/sezzle_client/models/body_2.rb +197 -0
- data/lib/sezzle_client/models/body_3.rb +215 -0
- data/lib/sezzle_client/models/body_4.rb +215 -0
- data/lib/sezzle_client/models/capture.rb +215 -0
- data/lib/sezzle_client/models/customer.rb +260 -0
- data/lib/sezzle_client/models/discount.rb +225 -0
- data/lib/sezzle_client/models/error.rb +201 -0
- data/lib/sezzle_client/models/error_inner.rb +233 -0
- data/lib/sezzle_client/models/inline_response_200.rb +239 -0
- data/lib/sezzle_client/models/inline_response_200_1.rb +286 -0
- data/lib/sezzle_client/models/inline_response_200_2.rb +226 -0
- data/lib/sezzle_client/models/inline_response_200_3.rb +284 -0
- data/lib/sezzle_client/models/inline_response_200_4.rb +215 -0
- data/lib/sezzle_client/models/inline_response_200_5.rb +257 -0
- data/lib/sezzle_client/models/inline_response_200_6.rb +206 -0
- data/lib/sezzle_client/models/inline_response_200_7.rb +277 -0
- data/lib/sezzle_client/models/inline_response_200_8.rb +217 -0
- data/lib/sezzle_client/models/inline_response_200_9.rb +206 -0
- data/lib/sezzle_client/models/inline_response_200_order.rb +235 -0
- data/lib/sezzle_client/models/inline_response_201.rb +224 -0
- data/lib/sezzle_client/models/inline_response_201_1.rb +235 -0
- data/lib/sezzle_client/models/inline_response_201_1_order.rb +226 -0
- data/lib/sezzle_client/models/inline_response_201_1_tokenize.rb +235 -0
- data/lib/sezzle_client/models/installment_plan.rb +28 -0
- data/lib/sezzle_client/models/intent.rb +28 -0
- data/lib/sezzle_client/models/line_item.rb +253 -0
- data/lib/sezzle_client/models/link.rb +224 -0
- data/lib/sezzle_client/models/notification.rb +224 -0
- data/lib/sezzle_client/models/order.rb +284 -0
- data/lib/sezzle_client/models/order_authorization.rb +257 -0
- data/lib/sezzle_client/models/payout.rb +201 -0
- data/lib/sezzle_client/models/payout_inner.rb +251 -0
- data/lib/sezzle_client/models/price.rb +225 -0
- data/lib/sezzle_client/models/refund.rb +215 -0
- data/lib/sezzle_client/models/session.rb +243 -0
- data/lib/sezzle_client/models/session_cancel_url.rb +215 -0
- data/lib/sezzle_client/models/session_status.rb +217 -0
- data/lib/sezzle_client/models/token.rb +235 -0
- data/lib/sezzle_client/models/webhook.rb +222 -0
- data/lib/sezzle_client/version.rb +14 -0
- data/sezzle_client.gemspec +38 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/bearer_authentication_api_spec.rb +45 -0
- data/spec/api/customer_api_spec.rb +91 -0
- data/spec/api/order_api_spec.rb +119 -0
- data/spec/api/reports_api_spec.rb +84 -0
- data/spec/api/session_api_spec.rb +57 -0
- data/spec/api/token_api_spec.rb +56 -0
- data/spec/api/webhooks_api_spec.rb +66 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/address_spec.rb +82 -0
- data/spec/models/all_of_session_customer_spec.rb +76 -0
- data/spec/models/all_of_session_order_spec.rb +106 -0
- data/spec/models/authorization_spec.rb +82 -0
- data/spec/models/body_1_spec.rb +40 -0
- data/spec/models/body_2_spec.rb +34 -0
- data/spec/models/body_3_spec.rb +46 -0
- data/spec/models/body_4_spec.rb +46 -0
- data/spec/models/body_spec.rb +46 -0
- data/spec/models/capture_spec.rb +46 -0
- data/spec/models/customer_spec.rb +76 -0
- data/spec/models/discount_spec.rb +46 -0
- data/spec/models/error_inner_spec.rb +58 -0
- data/spec/models/error_spec.rb +34 -0
- data/spec/models/inline_response_200_1_spec.rb +88 -0
- data/spec/models/inline_response_200_2_spec.rb +52 -0
- data/spec/models/inline_response_200_3_spec.rb +88 -0
- data/spec/models/inline_response_200_4_spec.rb +46 -0
- data/spec/models/inline_response_200_5_spec.rb +70 -0
- data/spec/models/inline_response_200_6_spec.rb +40 -0
- data/spec/models/inline_response_200_7_spec.rb +82 -0
- data/spec/models/inline_response_200_8_spec.rb +46 -0
- data/spec/models/inline_response_200_9_spec.rb +40 -0
- data/spec/models/inline_response_200_order_spec.rb +58 -0
- data/spec/models/inline_response_200_spec.rb +58 -0
- data/spec/models/inline_response_201_1_order_spec.rb +52 -0
- data/spec/models/inline_response_201_1_spec.rb +58 -0
- data/spec/models/inline_response_201_1_tokenize_spec.rb +58 -0
- data/spec/models/inline_response_201_spec.rb +52 -0
- data/spec/models/installment_plan_spec.rb +34 -0
- data/spec/models/intent_spec.rb +34 -0
- data/spec/models/line_item_spec.rb +58 -0
- data/spec/models/link_spec.rb +52 -0
- data/spec/models/notification_spec.rb +52 -0
- data/spec/models/order_authorization_spec.rb +70 -0
- data/spec/models/order_spec.rb +88 -0
- data/spec/models/payout_inner_spec.rb +70 -0
- data/spec/models/payout_spec.rb +34 -0
- data/spec/models/price_spec.rb +46 -0
- data/spec/models/refund_spec.rb +46 -0
- data/spec/models/session_cancel_url_spec.rb +46 -0
- data/spec/models/session_spec.rb +58 -0
- data/spec/models/session_status_spec.rb +46 -0
- data/spec/models/token_spec.rb +58 -0
- data/spec/models/webhook_spec.rb +46 -0
- data/spec/spec_helper.rb +110 -0
- metadata +331 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d661ddef7aa87e200a9929e7ff4f68515cc277f3b646de536da2abd622bbdb8b
|
4
|
+
data.tar.gz: 6da594be72aec5a12455e7e24ce69d114fbaf24ebb49ae9f2f19308dcdefc0b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ecb732fec5f762fd7120218b25822e8ab2939d2645d3f84a349add3a174857e52e4735cb13b8354df1c731e698de7d66930f4892c54de2e3965ce343c09525f8
|
7
|
+
data.tar.gz: cf65e349232d2c4486e5d72ad85b7b7999e41950b5c4c69fccde302b3599be1f946a9ef51dc6ca359bad1a1ed0490576fc9a516d23d5241f412d3325c2ffdb49
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,611 @@
|
|
1
|
+
# sezzle_client
|
2
|
+
|
3
|
+
SezzleClient - the Ruby gem for the Sezzle API
|
4
|
+
|
5
|
+
The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: 2.0.0
|
10
|
+
- Package version: 1.0.0
|
11
|
+
- Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build sezzle_client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./sezzle_client-1.0.0.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./sezzle_client-1.0.0.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'sezzle_client', '~> 1.0.0'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'sezzle_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'sezzle_client'
|
56
|
+
|
57
|
+
api_instance = SezzleClient::BearerAuthenticationApi.new
|
58
|
+
body = SezzleClient::Body.new # Body | Authentication request
|
59
|
+
|
60
|
+
|
61
|
+
begin
|
62
|
+
#Get bearer authentication token
|
63
|
+
result = api_instance.post_v1_authentication(body)
|
64
|
+
p result
|
65
|
+
rescue SezzleClient::ApiError => e
|
66
|
+
puts "Exception when calling BearerAuthenticationApi->post_v1_authentication: #{e}"
|
67
|
+
end
|
68
|
+
# Setup authorization
|
69
|
+
SezzleClient.configure do |config|
|
70
|
+
# Configure API key authorization: Bearer
|
71
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
72
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
73
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
74
|
+
end
|
75
|
+
|
76
|
+
api_instance = SezzleClient::CustomerApi.new
|
77
|
+
customer_uuid = 'customer_uuid_example' # String | Customer UUID
|
78
|
+
|
79
|
+
|
80
|
+
begin
|
81
|
+
#Delete customer
|
82
|
+
api_instance.delete_v2_token(customer_uuid)
|
83
|
+
rescue SezzleClient::ApiError => e
|
84
|
+
puts "Exception when calling CustomerApi->delete_v2_token: #{e}"
|
85
|
+
end
|
86
|
+
# Setup authorization
|
87
|
+
SezzleClient.configure do |config|
|
88
|
+
# Configure API key authorization: Bearer
|
89
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
90
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
91
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
92
|
+
end
|
93
|
+
|
94
|
+
api_instance = SezzleClient::CustomerApi.new
|
95
|
+
customer_uuid = 'customer_uuid_example' # String | Customer UUID
|
96
|
+
|
97
|
+
|
98
|
+
begin
|
99
|
+
#Get customer
|
100
|
+
result = api_instance.get_v2_customer(customer_uuid)
|
101
|
+
p result
|
102
|
+
rescue SezzleClient::ApiError => e
|
103
|
+
puts "Exception when calling CustomerApi->get_v2_customer: #{e}"
|
104
|
+
end
|
105
|
+
# Setup authorization
|
106
|
+
SezzleClient.configure do |config|
|
107
|
+
# Configure API key authorization: Bearer
|
108
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
109
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
110
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
111
|
+
end
|
112
|
+
|
113
|
+
api_instance = SezzleClient::CustomerApi.new
|
114
|
+
|
115
|
+
begin
|
116
|
+
#Get list of customers
|
117
|
+
result = api_instance.get_v2_customer_list
|
118
|
+
p result
|
119
|
+
rescue SezzleClient::ApiError => e
|
120
|
+
puts "Exception when calling CustomerApi->get_v2_customer_list: #{e}"
|
121
|
+
end
|
122
|
+
# Setup authorization
|
123
|
+
SezzleClient.configure do |config|
|
124
|
+
# Configure API key authorization: Bearer
|
125
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
126
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
127
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
128
|
+
end
|
129
|
+
|
130
|
+
api_instance = SezzleClient::CustomerApi.new
|
131
|
+
customer_uuid = 'customer_uuid_example' # String | Customer UUID
|
132
|
+
opts = {
|
133
|
+
body: SezzleClient::Body2.new, # Body2 | Order request
|
134
|
+
sezzle_request_id: 'sezzle_request_id_example' # String | Unique client-generated ID to enforce idempotency
|
135
|
+
}
|
136
|
+
|
137
|
+
begin
|
138
|
+
#Create order by customer
|
139
|
+
result = api_instance.post_v2_customer_order(customer_uuid, opts)
|
140
|
+
p result
|
141
|
+
rescue SezzleClient::ApiError => e
|
142
|
+
puts "Exception when calling CustomerApi->post_v2_customer_order: #{e}"
|
143
|
+
end
|
144
|
+
# Setup authorization
|
145
|
+
SezzleClient.configure do |config|
|
146
|
+
# Configure API key authorization: Bearer
|
147
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
148
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
149
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
150
|
+
end
|
151
|
+
|
152
|
+
api_instance = SezzleClient::CustomerApi.new
|
153
|
+
customer_uuid = 'customer_uuid_example' # String | Customer UUID
|
154
|
+
opts = {
|
155
|
+
body: SezzleClient::Price.new # Price | Preapproval request
|
156
|
+
}
|
157
|
+
|
158
|
+
begin
|
159
|
+
#Preapprove amount by customer
|
160
|
+
result = api_instance.preapprove_v2_token(customer_uuid, opts)
|
161
|
+
p result
|
162
|
+
rescue SezzleClient::ApiError => e
|
163
|
+
puts "Exception when calling CustomerApi->preapprove_v2_token: #{e}"
|
164
|
+
end
|
165
|
+
# Setup authorization
|
166
|
+
SezzleClient.configure do |config|
|
167
|
+
# Configure API key authorization: Bearer
|
168
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
169
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
170
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
171
|
+
end
|
172
|
+
|
173
|
+
api_instance = SezzleClient::OrderApi.new
|
174
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
175
|
+
|
176
|
+
|
177
|
+
begin
|
178
|
+
#Get order details
|
179
|
+
result = api_instance.get_v2_order(order_uuid)
|
180
|
+
p result
|
181
|
+
rescue SezzleClient::ApiError => e
|
182
|
+
puts "Exception when calling OrderApi->get_v2_order: #{e}"
|
183
|
+
end
|
184
|
+
# Setup authorization
|
185
|
+
SezzleClient.configure do |config|
|
186
|
+
# Configure API key authorization: Bearer
|
187
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
188
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
189
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
190
|
+
end
|
191
|
+
|
192
|
+
api_instance = SezzleClient::OrderApi.new
|
193
|
+
body = SezzleClient::Body1.new # Body1 | Session request
|
194
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
195
|
+
|
196
|
+
|
197
|
+
begin
|
198
|
+
#Update order
|
199
|
+
api_instance.patch_v2_checkout(body, order_uuid)
|
200
|
+
rescue SezzleClient::ApiError => e
|
201
|
+
puts "Exception when calling OrderApi->patch_v2_checkout: #{e}"
|
202
|
+
end
|
203
|
+
# Setup authorization
|
204
|
+
SezzleClient.configure do |config|
|
205
|
+
# Configure API key authorization: Bearer
|
206
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
207
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
208
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
209
|
+
end
|
210
|
+
|
211
|
+
api_instance = SezzleClient::OrderApi.new
|
212
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
213
|
+
opts = {
|
214
|
+
body: SezzleClient::Body3.new # Body3 | Capture request
|
215
|
+
}
|
216
|
+
|
217
|
+
begin
|
218
|
+
#Capture amount by order
|
219
|
+
result = api_instance.post_v2_capture_by_order(order_uuid, opts)
|
220
|
+
p result
|
221
|
+
rescue SezzleClient::ApiError => e
|
222
|
+
puts "Exception when calling OrderApi->post_v2_capture_by_order: #{e}"
|
223
|
+
end
|
224
|
+
# Setup authorization
|
225
|
+
SezzleClient.configure do |config|
|
226
|
+
# Configure API key authorization: Bearer
|
227
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
228
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
229
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
230
|
+
end
|
231
|
+
|
232
|
+
api_instance = SezzleClient::OrderApi.new
|
233
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
234
|
+
opts = {
|
235
|
+
body: SezzleClient::Price.new # Price | Reauthorize request
|
236
|
+
}
|
237
|
+
|
238
|
+
begin
|
239
|
+
#Reauthorize amount by order
|
240
|
+
result = api_instance.post_v2_reauthorize_by_order(order_uuid, opts)
|
241
|
+
p result
|
242
|
+
rescue SezzleClient::ApiError => e
|
243
|
+
puts "Exception when calling OrderApi->post_v2_reauthorize_by_order: #{e}"
|
244
|
+
end
|
245
|
+
# Setup authorization
|
246
|
+
SezzleClient.configure do |config|
|
247
|
+
# Configure API key authorization: Bearer
|
248
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
249
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
250
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
251
|
+
end
|
252
|
+
|
253
|
+
api_instance = SezzleClient::OrderApi.new
|
254
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
255
|
+
opts = {
|
256
|
+
body: SezzleClient::Price.new # Price | Refund request
|
257
|
+
}
|
258
|
+
|
259
|
+
begin
|
260
|
+
#Refund amount by order
|
261
|
+
result = api_instance.post_v2_refund_by_order(order_uuid, opts)
|
262
|
+
p result
|
263
|
+
rescue SezzleClient::ApiError => e
|
264
|
+
puts "Exception when calling OrderApi->post_v2_refund_by_order: #{e}"
|
265
|
+
end
|
266
|
+
# Setup authorization
|
267
|
+
SezzleClient.configure do |config|
|
268
|
+
# Configure API key authorization: Bearer
|
269
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
270
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
271
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
272
|
+
end
|
273
|
+
|
274
|
+
api_instance = SezzleClient::OrderApi.new
|
275
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
276
|
+
opts = {
|
277
|
+
body: SezzleClient::Price.new # Price | Release request
|
278
|
+
}
|
279
|
+
|
280
|
+
begin
|
281
|
+
#Release amount by order
|
282
|
+
result = api_instance.post_v2_release_by_order(order_uuid, opts)
|
283
|
+
p result
|
284
|
+
rescue SezzleClient::ApiError => e
|
285
|
+
puts "Exception when calling OrderApi->post_v2_release_by_order: #{e}"
|
286
|
+
end
|
287
|
+
# Setup authorization
|
288
|
+
SezzleClient.configure do |config|
|
289
|
+
# Configure API key authorization: Bearer
|
290
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
291
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
292
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
293
|
+
end
|
294
|
+
|
295
|
+
api_instance = SezzleClient::OrderApi.new
|
296
|
+
order_uuid = 'order_uuid_example' # String | Order UUID
|
297
|
+
opts = {
|
298
|
+
body: SezzleClient::Body4.new # Body4 | Upcharge request
|
299
|
+
}
|
300
|
+
|
301
|
+
begin
|
302
|
+
#Upcharge amount by order
|
303
|
+
result = api_instance.post_v2_upcharge_by_order(order_uuid, opts)
|
304
|
+
p result
|
305
|
+
rescue SezzleClient::ApiError => e
|
306
|
+
puts "Exception when calling OrderApi->post_v2_upcharge_by_order: #{e}"
|
307
|
+
end
|
308
|
+
# Setup authorization
|
309
|
+
SezzleClient.configure do |config|
|
310
|
+
# Configure API key authorization: Bearer
|
311
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
312
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
313
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = SezzleClient::ReportsApi.new
|
317
|
+
start_date = 'start_date_example' # String | Start Date
|
318
|
+
opts = {
|
319
|
+
end_date: 'end_date_example', # String | End Date
|
320
|
+
offset: 'offset_example', # String | Pagination Offset (Limit 20)
|
321
|
+
currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
|
322
|
+
}
|
323
|
+
|
324
|
+
begin
|
325
|
+
#Interest Account Activity
|
326
|
+
result = api_instance.get_interest_account_activity(start_date, opts)
|
327
|
+
p result
|
328
|
+
rescue SezzleClient::ApiError => e
|
329
|
+
puts "Exception when calling ReportsApi->get_interest_account_activity: #{e}"
|
330
|
+
end
|
331
|
+
# Setup authorization
|
332
|
+
SezzleClient.configure do |config|
|
333
|
+
# Configure API key authorization: Bearer
|
334
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
335
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
336
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
337
|
+
end
|
338
|
+
|
339
|
+
api_instance = SezzleClient::ReportsApi.new
|
340
|
+
opts = {
|
341
|
+
currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
|
342
|
+
}
|
343
|
+
|
344
|
+
begin
|
345
|
+
#Interest Account Balance
|
346
|
+
result = api_instance.get_interest_account_balance(opts)
|
347
|
+
p result
|
348
|
+
rescue SezzleClient::ApiError => e
|
349
|
+
puts "Exception when calling ReportsApi->get_interest_account_balance: #{e}"
|
350
|
+
end
|
351
|
+
# Setup authorization
|
352
|
+
SezzleClient.configure do |config|
|
353
|
+
# Configure API key authorization: Bearer
|
354
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
355
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
356
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
357
|
+
end
|
358
|
+
|
359
|
+
api_instance = SezzleClient::ReportsApi.new
|
360
|
+
payout_uuid = 'payout_uuid_example' # String | Payout UUID
|
361
|
+
|
362
|
+
|
363
|
+
begin
|
364
|
+
#Settlement Details
|
365
|
+
result = api_instance.get_settlement_details(payout_uuid)
|
366
|
+
p result
|
367
|
+
rescue SezzleClient::ApiError => e
|
368
|
+
puts "Exception when calling ReportsApi->get_settlement_details: #{e}"
|
369
|
+
end
|
370
|
+
# Setup authorization
|
371
|
+
SezzleClient.configure do |config|
|
372
|
+
# Configure API key authorization: Bearer
|
373
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
374
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
375
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
376
|
+
end
|
377
|
+
|
378
|
+
api_instance = SezzleClient::ReportsApi.new
|
379
|
+
start_date = 'start_date_example' # String | Start Date
|
380
|
+
opts = {
|
381
|
+
end_date: 'end_date_example', # String | End Date
|
382
|
+
offset: 'offset_example', # String | Pagination Offset (Limit 20)
|
383
|
+
currency_code: 'currency_code_example' # String | ISO-4217 Currency Code
|
384
|
+
}
|
385
|
+
|
386
|
+
begin
|
387
|
+
#Settlement Summaries
|
388
|
+
result = api_instance.get_settlement_summaries(start_date, opts)
|
389
|
+
p result
|
390
|
+
rescue SezzleClient::ApiError => e
|
391
|
+
puts "Exception when calling ReportsApi->get_settlement_summaries: #{e}"
|
392
|
+
end
|
393
|
+
# Setup authorization
|
394
|
+
SezzleClient.configure do |config|
|
395
|
+
# Configure API key authorization: Bearer
|
396
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
397
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
398
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
399
|
+
end
|
400
|
+
|
401
|
+
api_instance = SezzleClient::SessionApi.new
|
402
|
+
session_uuid = 'session_uuid_example' # String | Session UUID
|
403
|
+
|
404
|
+
|
405
|
+
begin
|
406
|
+
#Get session status
|
407
|
+
result = api_instance.get_v2_session(session_uuid)
|
408
|
+
p result
|
409
|
+
rescue SezzleClient::ApiError => e
|
410
|
+
puts "Exception when calling SessionApi->get_v2_session: #{e}"
|
411
|
+
end
|
412
|
+
# Setup authorization
|
413
|
+
SezzleClient.configure do |config|
|
414
|
+
# Configure API key authorization: Bearer
|
415
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
416
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
417
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
418
|
+
end
|
419
|
+
|
420
|
+
api_instance = SezzleClient::SessionApi.new
|
421
|
+
body = SezzleClient::Session.new # Session | Session request
|
422
|
+
|
423
|
+
|
424
|
+
begin
|
425
|
+
#Create a new session
|
426
|
+
result = api_instance.post_v2_session(body)
|
427
|
+
p result
|
428
|
+
rescue SezzleClient::ApiError => e
|
429
|
+
puts "Exception when calling SessionApi->post_v2_session: #{e}"
|
430
|
+
end
|
431
|
+
# Setup authorization
|
432
|
+
SezzleClient.configure do |config|
|
433
|
+
# Configure API key authorization: Bearer
|
434
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
435
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
436
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
437
|
+
end
|
438
|
+
|
439
|
+
api_instance = SezzleClient::TokenApi.new
|
440
|
+
token = 'token_example' # String | Customer initiated token, e.g. generated in mobile app
|
441
|
+
|
442
|
+
|
443
|
+
begin
|
444
|
+
#Get customer token
|
445
|
+
api_instance.get_v2_customer_token(token)
|
446
|
+
rescue SezzleClient::ApiError => e
|
447
|
+
puts "Exception when calling TokenApi->get_v2_customer_token: #{e}"
|
448
|
+
end
|
449
|
+
# Setup authorization
|
450
|
+
SezzleClient.configure do |config|
|
451
|
+
# Configure API key authorization: Bearer
|
452
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
453
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
454
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
455
|
+
end
|
456
|
+
|
457
|
+
api_instance = SezzleClient::TokenApi.new
|
458
|
+
token = 'token_example' # String | Merchant initiated token
|
459
|
+
|
460
|
+
|
461
|
+
begin
|
462
|
+
#Get session token
|
463
|
+
result = api_instance.get_v2_session_token(token)
|
464
|
+
p result
|
465
|
+
rescue SezzleClient::ApiError => e
|
466
|
+
puts "Exception when calling TokenApi->get_v2_session_token: #{e}"
|
467
|
+
end
|
468
|
+
# Setup authorization
|
469
|
+
SezzleClient.configure do |config|
|
470
|
+
# Configure API key authorization: Bearer
|
471
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
472
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
473
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
474
|
+
end
|
475
|
+
|
476
|
+
api_instance = SezzleClient::WebhooksApi.new
|
477
|
+
webhooks_uuid = 'webhooks_uuid_example' # String | Webhooks UUID
|
478
|
+
|
479
|
+
|
480
|
+
begin
|
481
|
+
#Delete webhooks
|
482
|
+
api_instance.delete_v2_webhooks(webhooks_uuid)
|
483
|
+
rescue SezzleClient::ApiError => e
|
484
|
+
puts "Exception when calling WebhooksApi->delete_v2_webhooks: #{e}"
|
485
|
+
end
|
486
|
+
# Setup authorization
|
487
|
+
SezzleClient.configure do |config|
|
488
|
+
# Configure API key authorization: Bearer
|
489
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
490
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
491
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
492
|
+
end
|
493
|
+
|
494
|
+
api_instance = SezzleClient::WebhooksApi.new
|
495
|
+
|
496
|
+
begin
|
497
|
+
#List webhooks
|
498
|
+
result = api_instance.get_v2_webhooks
|
499
|
+
p result
|
500
|
+
rescue SezzleClient::ApiError => e
|
501
|
+
puts "Exception when calling WebhooksApi->get_v2_webhooks: #{e}"
|
502
|
+
end
|
503
|
+
# Setup authorization
|
504
|
+
SezzleClient.configure do |config|
|
505
|
+
# Configure API key authorization: Bearer
|
506
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
507
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
508
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
509
|
+
end
|
510
|
+
|
511
|
+
api_instance = SezzleClient::WebhooksApi.new
|
512
|
+
body = SezzleClient::Webhook.new # Webhook | Webhooks request
|
513
|
+
|
514
|
+
|
515
|
+
begin
|
516
|
+
#Create webhooks
|
517
|
+
result = api_instance.post_v2_webhooks(body)
|
518
|
+
p result
|
519
|
+
rescue SezzleClient::ApiError => e
|
520
|
+
puts "Exception when calling WebhooksApi->post_v2_webhooks: #{e}"
|
521
|
+
end
|
522
|
+
```
|
523
|
+
|
524
|
+
## Documentation for API Endpoints
|
525
|
+
|
526
|
+
All URIs are relative to *//sandbox.gateway.sezzle.com/v2/*
|
527
|
+
|
528
|
+
Class | Method | HTTP request | Description
|
529
|
+
------------ | ------------- | ------------- | -------------
|
530
|
+
*SezzleClient::BearerAuthenticationApi* | [**post_v1_authentication**](docs/BearerAuthenticationApi.md#post_v1_authentication) | **POST** /authentication | Get bearer authentication token
|
531
|
+
*SezzleClient::CustomerApi* | [**delete_v2_token**](docs/CustomerApi.md#delete_v2_token) | **DELETE** /customer/{customer_uuid} | Delete customer
|
532
|
+
*SezzleClient::CustomerApi* | [**get_v2_customer**](docs/CustomerApi.md#get_v2_customer) | **GET** /customer/{customer_uuid} | Get customer
|
533
|
+
*SezzleClient::CustomerApi* | [**get_v2_customer_list**](docs/CustomerApi.md#get_v2_customer_list) | **GET** /customer | Get list of customers
|
534
|
+
*SezzleClient::CustomerApi* | [**post_v2_customer_order**](docs/CustomerApi.md#post_v2_customer_order) | **POST** /customer/{customer_uuid}/order | Create order by customer
|
535
|
+
*SezzleClient::CustomerApi* | [**preapprove_v2_token**](docs/CustomerApi.md#preapprove_v2_token) | **POST** /customer/{customer_uuid}/preapprove | Preapprove amount by customer
|
536
|
+
*SezzleClient::OrderApi* | [**get_v2_order**](docs/OrderApi.md#get_v2_order) | **GET** /order/{order_uuid} | Get order details
|
537
|
+
*SezzleClient::OrderApi* | [**patch_v2_checkout**](docs/OrderApi.md#patch_v2_checkout) | **PATCH** /order/{order_uuid} | Update order
|
538
|
+
*SezzleClient::OrderApi* | [**post_v2_capture_by_order**](docs/OrderApi.md#post_v2_capture_by_order) | **POST** /order/{order_uuid}/capture | Capture amount by order
|
539
|
+
*SezzleClient::OrderApi* | [**post_v2_reauthorize_by_order**](docs/OrderApi.md#post_v2_reauthorize_by_order) | **POST** /order/{order_uuid}/reauthorize | Reauthorize amount by order
|
540
|
+
*SezzleClient::OrderApi* | [**post_v2_refund_by_order**](docs/OrderApi.md#post_v2_refund_by_order) | **POST** /order/{order_uuid}/refund | Refund amount by order
|
541
|
+
*SezzleClient::OrderApi* | [**post_v2_release_by_order**](docs/OrderApi.md#post_v2_release_by_order) | **POST** /order/{order_uuid}/release | Release amount by order
|
542
|
+
*SezzleClient::OrderApi* | [**post_v2_upcharge_by_order**](docs/OrderApi.md#post_v2_upcharge_by_order) | **POST** /order/{order_uuid}/upcharge | Upcharge amount by order
|
543
|
+
*SezzleClient::ReportsApi* | [**get_interest_account_activity**](docs/ReportsApi.md#get_interest_account_activity) | **GET** /interest/activity | Interest Account Activity
|
544
|
+
*SezzleClient::ReportsApi* | [**get_interest_account_balance**](docs/ReportsApi.md#get_interest_account_balance) | **GET** /interest/balance | Interest Account Balance
|
545
|
+
*SezzleClient::ReportsApi* | [**get_settlement_details**](docs/ReportsApi.md#get_settlement_details) | **GET** /settlements/details/{payout_uuid} | Settlement Details
|
546
|
+
*SezzleClient::ReportsApi* | [**get_settlement_summaries**](docs/ReportsApi.md#get_settlement_summaries) | **GET** /settlements/summaries | Settlement Summaries
|
547
|
+
*SezzleClient::SessionApi* | [**get_v2_session**](docs/SessionApi.md#get_v2_session) | **GET** /session/{session_uuid} | Get session status
|
548
|
+
*SezzleClient::SessionApi* | [**post_v2_session**](docs/SessionApi.md#post_v2_session) | **POST** /session | Create a new session
|
549
|
+
*SezzleClient::TokenApi* | [**get_v2_customer_token**](docs/TokenApi.md#get_v2_customer_token) | **GET** /token/{token}/customer | Get customer token
|
550
|
+
*SezzleClient::TokenApi* | [**get_v2_session_token**](docs/TokenApi.md#get_v2_session_token) | **GET** /token/{token}/session | Get session token
|
551
|
+
*SezzleClient::WebhooksApi* | [**delete_v2_webhooks**](docs/WebhooksApi.md#delete_v2_webhooks) | **DELETE** /webhooks/{webhooks_uuid} | Delete webhooks
|
552
|
+
*SezzleClient::WebhooksApi* | [**get_v2_webhooks**](docs/WebhooksApi.md#get_v2_webhooks) | **GET** /webhooks | List webhooks
|
553
|
+
*SezzleClient::WebhooksApi* | [**post_v2_webhooks**](docs/WebhooksApi.md#post_v2_webhooks) | **POST** /webhooks | Create webhooks
|
554
|
+
|
555
|
+
## Documentation for Models
|
556
|
+
|
557
|
+
- [SezzleClient::Address](docs/Address.md)
|
558
|
+
- [SezzleClient::AllOfSessionCustomer](docs/AllOfSessionCustomer.md)
|
559
|
+
- [SezzleClient::AllOfSessionOrder](docs/AllOfSessionOrder.md)
|
560
|
+
- [SezzleClient::Authorization](docs/Authorization.md)
|
561
|
+
- [SezzleClient::Body](docs/Body.md)
|
562
|
+
- [SezzleClient::Body1](docs/Body1.md)
|
563
|
+
- [SezzleClient::Body2](docs/Body2.md)
|
564
|
+
- [SezzleClient::Body3](docs/Body3.md)
|
565
|
+
- [SezzleClient::Body4](docs/Body4.md)
|
566
|
+
- [SezzleClient::Capture](docs/Capture.md)
|
567
|
+
- [SezzleClient::Customer](docs/Customer.md)
|
568
|
+
- [SezzleClient::Discount](docs/Discount.md)
|
569
|
+
- [SezzleClient::Error](docs/Error.md)
|
570
|
+
- [SezzleClient::ErrorInner](docs/ErrorInner.md)
|
571
|
+
- [SezzleClient::InlineResponse200](docs/InlineResponse200.md)
|
572
|
+
- [SezzleClient::InlineResponse2001](docs/InlineResponse2001.md)
|
573
|
+
- [SezzleClient::InlineResponse2002](docs/InlineResponse2002.md)
|
574
|
+
- [SezzleClient::InlineResponse2003](docs/InlineResponse2003.md)
|
575
|
+
- [SezzleClient::InlineResponse2004](docs/InlineResponse2004.md)
|
576
|
+
- [SezzleClient::InlineResponse2005](docs/InlineResponse2005.md)
|
577
|
+
- [SezzleClient::InlineResponse2006](docs/InlineResponse2006.md)
|
578
|
+
- [SezzleClient::InlineResponse2007](docs/InlineResponse2007.md)
|
579
|
+
- [SezzleClient::InlineResponse2008](docs/InlineResponse2008.md)
|
580
|
+
- [SezzleClient::InlineResponse2009](docs/InlineResponse2009.md)
|
581
|
+
- [SezzleClient::InlineResponse200Order](docs/InlineResponse200Order.md)
|
582
|
+
- [SezzleClient::InlineResponse201](docs/InlineResponse201.md)
|
583
|
+
- [SezzleClient::InlineResponse2011](docs/InlineResponse2011.md)
|
584
|
+
- [SezzleClient::InlineResponse2011Order](docs/InlineResponse2011Order.md)
|
585
|
+
- [SezzleClient::InlineResponse2011Tokenize](docs/InlineResponse2011Tokenize.md)
|
586
|
+
- [SezzleClient::InstallmentPlan](docs/InstallmentPlan.md)
|
587
|
+
- [SezzleClient::Intent](docs/Intent.md)
|
588
|
+
- [SezzleClient::LineItem](docs/LineItem.md)
|
589
|
+
- [SezzleClient::Link](docs/Link.md)
|
590
|
+
- [SezzleClient::Notification](docs/Notification.md)
|
591
|
+
- [SezzleClient::Order](docs/Order.md)
|
592
|
+
- [SezzleClient::OrderAuthorization](docs/OrderAuthorization.md)
|
593
|
+
- [SezzleClient::Payout](docs/Payout.md)
|
594
|
+
- [SezzleClient::PayoutInner](docs/PayoutInner.md)
|
595
|
+
- [SezzleClient::Price](docs/Price.md)
|
596
|
+
- [SezzleClient::Refund](docs/Refund.md)
|
597
|
+
- [SezzleClient::Session](docs/Session.md)
|
598
|
+
- [SezzleClient::SessionCancelUrl](docs/SessionCancelUrl.md)
|
599
|
+
- [SezzleClient::SessionStatus](docs/SessionStatus.md)
|
600
|
+
- [SezzleClient::Token](docs/Token.md)
|
601
|
+
- [SezzleClient::Webhook](docs/Webhook.md)
|
602
|
+
|
603
|
+
## Documentation for Authorization
|
604
|
+
|
605
|
+
|
606
|
+
### Bearer
|
607
|
+
|
608
|
+
- **Type**: API key
|
609
|
+
- **API key parameter name**: Authorization
|
610
|
+
- **Location**: HTTP header
|
611
|
+
|