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.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +611 -0
  4. data/Rakefile +8 -0
  5. data/docs/Address.md +14 -0
  6. data/docs/AllOfSessionCustomer.md +13 -0
  7. data/docs/AllOfSessionOrder.md +18 -0
  8. data/docs/Authorization.md +14 -0
  9. data/docs/BearerAuthenticationApi.md +52 -0
  10. data/docs/Body.md +8 -0
  11. data/docs/Body1.md +7 -0
  12. data/docs/Body2.md +6 -0
  13. data/docs/Body3.md +8 -0
  14. data/docs/Body4.md +8 -0
  15. data/docs/Capture.md +8 -0
  16. data/docs/Customer.md +13 -0
  17. data/docs/CustomerApi.md +269 -0
  18. data/docs/Discount.md +8 -0
  19. data/docs/Error.md +6 -0
  20. data/docs/ErrorInner.md +10 -0
  21. data/docs/InlineResponse200.md +10 -0
  22. data/docs/InlineResponse2001.md +15 -0
  23. data/docs/InlineResponse2002.md +9 -0
  24. data/docs/InlineResponse2003.md +15 -0
  25. data/docs/InlineResponse2004.md +8 -0
  26. data/docs/InlineResponse2005.md +12 -0
  27. data/docs/InlineResponse2006.md +7 -0
  28. data/docs/InlineResponse2007.md +14 -0
  29. data/docs/InlineResponse2008.md +8 -0
  30. data/docs/InlineResponse2009.md +7 -0
  31. data/docs/InlineResponse200Order.md +10 -0
  32. data/docs/InlineResponse201.md +9 -0
  33. data/docs/InlineResponse2011.md +10 -0
  34. data/docs/InlineResponse2011Order.md +9 -0
  35. data/docs/InlineResponse2011Tokenize.md +10 -0
  36. data/docs/InstallmentPlan.md +6 -0
  37. data/docs/Intent.md +6 -0
  38. data/docs/LineItem.md +10 -0
  39. data/docs/Link.md +9 -0
  40. data/docs/Notification.md +9 -0
  41. data/docs/Order.md +15 -0
  42. data/docs/OrderApi.md +391 -0
  43. data/docs/OrderAuthorization.md +12 -0
  44. data/docs/Payout.md +6 -0
  45. data/docs/PayoutInner.md +12 -0
  46. data/docs/Price.md +8 -0
  47. data/docs/Refund.md +8 -0
  48. data/docs/ReportsApi.md +230 -0
  49. data/docs/Session.md +10 -0
  50. data/docs/SessionApi.md +113 -0
  51. data/docs/SessionCancelUrl.md +8 -0
  52. data/docs/SessionStatus.md +8 -0
  53. data/docs/Token.md +10 -0
  54. data/docs/TokenApi.md +110 -0
  55. data/docs/Webhook.md +8 -0
  56. data/docs/WebhooksApi.md +157 -0
  57. data/git_push.sh +55 -0
  58. data/lib/sezzle_client.rb +90 -0
  59. data/lib/sezzle_client/api/bearer_authentication_api.rb +76 -0
  60. data/lib/sezzle_client/api/customer_api.rb +295 -0
  61. data/lib/sezzle_client/api/order_api.rb +430 -0
  62. data/lib/sezzle_client/api/reports_api.rb +253 -0
  63. data/lib/sezzle_client/api/session_api.rb +132 -0
  64. data/lib/sezzle_client/api/token_api.rb +126 -0
  65. data/lib/sezzle_client/api/webhooks_api.rb +178 -0
  66. data/lib/sezzle_client/api_client.rb +388 -0
  67. data/lib/sezzle_client/api_error.rb +57 -0
  68. data/lib/sezzle_client/configuration.rb +205 -0
  69. data/lib/sezzle_client/models/address.rb +297 -0
  70. data/lib/sezzle_client/models/all_of_session_customer.rb +260 -0
  71. data/lib/sezzle_client/models/all_of_session_order.rb +314 -0
  72. data/lib/sezzle_client/models/authorization.rb +281 -0
  73. data/lib/sezzle_client/models/body.rb +215 -0
  74. data/lib/sezzle_client/models/body_1.rb +206 -0
  75. data/lib/sezzle_client/models/body_2.rb +197 -0
  76. data/lib/sezzle_client/models/body_3.rb +215 -0
  77. data/lib/sezzle_client/models/body_4.rb +215 -0
  78. data/lib/sezzle_client/models/capture.rb +215 -0
  79. data/lib/sezzle_client/models/customer.rb +260 -0
  80. data/lib/sezzle_client/models/discount.rb +225 -0
  81. data/lib/sezzle_client/models/error.rb +201 -0
  82. data/lib/sezzle_client/models/error_inner.rb +233 -0
  83. data/lib/sezzle_client/models/inline_response_200.rb +239 -0
  84. data/lib/sezzle_client/models/inline_response_200_1.rb +286 -0
  85. data/lib/sezzle_client/models/inline_response_200_2.rb +226 -0
  86. data/lib/sezzle_client/models/inline_response_200_3.rb +284 -0
  87. data/lib/sezzle_client/models/inline_response_200_4.rb +215 -0
  88. data/lib/sezzle_client/models/inline_response_200_5.rb +257 -0
  89. data/lib/sezzle_client/models/inline_response_200_6.rb +206 -0
  90. data/lib/sezzle_client/models/inline_response_200_7.rb +277 -0
  91. data/lib/sezzle_client/models/inline_response_200_8.rb +217 -0
  92. data/lib/sezzle_client/models/inline_response_200_9.rb +206 -0
  93. data/lib/sezzle_client/models/inline_response_200_order.rb +235 -0
  94. data/lib/sezzle_client/models/inline_response_201.rb +224 -0
  95. data/lib/sezzle_client/models/inline_response_201_1.rb +235 -0
  96. data/lib/sezzle_client/models/inline_response_201_1_order.rb +226 -0
  97. data/lib/sezzle_client/models/inline_response_201_1_tokenize.rb +235 -0
  98. data/lib/sezzle_client/models/installment_plan.rb +28 -0
  99. data/lib/sezzle_client/models/intent.rb +28 -0
  100. data/lib/sezzle_client/models/line_item.rb +253 -0
  101. data/lib/sezzle_client/models/link.rb +224 -0
  102. data/lib/sezzle_client/models/notification.rb +224 -0
  103. data/lib/sezzle_client/models/order.rb +284 -0
  104. data/lib/sezzle_client/models/order_authorization.rb +257 -0
  105. data/lib/sezzle_client/models/payout.rb +201 -0
  106. data/lib/sezzle_client/models/payout_inner.rb +251 -0
  107. data/lib/sezzle_client/models/price.rb +225 -0
  108. data/lib/sezzle_client/models/refund.rb +215 -0
  109. data/lib/sezzle_client/models/session.rb +243 -0
  110. data/lib/sezzle_client/models/session_cancel_url.rb +215 -0
  111. data/lib/sezzle_client/models/session_status.rb +217 -0
  112. data/lib/sezzle_client/models/token.rb +235 -0
  113. data/lib/sezzle_client/models/webhook.rb +222 -0
  114. data/lib/sezzle_client/version.rb +14 -0
  115. data/sezzle_client.gemspec +38 -0
  116. data/spec/.DS_Store +0 -0
  117. data/spec/api/bearer_authentication_api_spec.rb +45 -0
  118. data/spec/api/customer_api_spec.rb +91 -0
  119. data/spec/api/order_api_spec.rb +119 -0
  120. data/spec/api/reports_api_spec.rb +84 -0
  121. data/spec/api/session_api_spec.rb +57 -0
  122. data/spec/api/token_api_spec.rb +56 -0
  123. data/spec/api/webhooks_api_spec.rb +66 -0
  124. data/spec/api_client_spec.rb +225 -0
  125. data/spec/base_object_spec.rb +109 -0
  126. data/spec/configuration_spec.rb +41 -0
  127. data/spec/models/address_spec.rb +82 -0
  128. data/spec/models/all_of_session_customer_spec.rb +76 -0
  129. data/spec/models/all_of_session_order_spec.rb +106 -0
  130. data/spec/models/authorization_spec.rb +82 -0
  131. data/spec/models/body_1_spec.rb +40 -0
  132. data/spec/models/body_2_spec.rb +34 -0
  133. data/spec/models/body_3_spec.rb +46 -0
  134. data/spec/models/body_4_spec.rb +46 -0
  135. data/spec/models/body_spec.rb +46 -0
  136. data/spec/models/capture_spec.rb +46 -0
  137. data/spec/models/customer_spec.rb +76 -0
  138. data/spec/models/discount_spec.rb +46 -0
  139. data/spec/models/error_inner_spec.rb +58 -0
  140. data/spec/models/error_spec.rb +34 -0
  141. data/spec/models/inline_response_200_1_spec.rb +88 -0
  142. data/spec/models/inline_response_200_2_spec.rb +52 -0
  143. data/spec/models/inline_response_200_3_spec.rb +88 -0
  144. data/spec/models/inline_response_200_4_spec.rb +46 -0
  145. data/spec/models/inline_response_200_5_spec.rb +70 -0
  146. data/spec/models/inline_response_200_6_spec.rb +40 -0
  147. data/spec/models/inline_response_200_7_spec.rb +82 -0
  148. data/spec/models/inline_response_200_8_spec.rb +46 -0
  149. data/spec/models/inline_response_200_9_spec.rb +40 -0
  150. data/spec/models/inline_response_200_order_spec.rb +58 -0
  151. data/spec/models/inline_response_200_spec.rb +58 -0
  152. data/spec/models/inline_response_201_1_order_spec.rb +52 -0
  153. data/spec/models/inline_response_201_1_spec.rb +58 -0
  154. data/spec/models/inline_response_201_1_tokenize_spec.rb +58 -0
  155. data/spec/models/inline_response_201_spec.rb +52 -0
  156. data/spec/models/installment_plan_spec.rb +34 -0
  157. data/spec/models/intent_spec.rb +34 -0
  158. data/spec/models/line_item_spec.rb +58 -0
  159. data/spec/models/link_spec.rb +52 -0
  160. data/spec/models/notification_spec.rb +52 -0
  161. data/spec/models/order_authorization_spec.rb +70 -0
  162. data/spec/models/order_spec.rb +88 -0
  163. data/spec/models/payout_inner_spec.rb +70 -0
  164. data/spec/models/payout_spec.rb +34 -0
  165. data/spec/models/price_spec.rb +46 -0
  166. data/spec/models/refund_spec.rb +46 -0
  167. data/spec/models/session_cancel_url_spec.rb +46 -0
  168. data/spec/models/session_spec.rb +58 -0
  169. data/spec/models/session_status_spec.rb +46 -0
  170. data/spec/models/token_spec.rb +58 -0
  171. data/spec/models/webhook_spec.rb +46 -0
  172. data/spec/spec_helper.rb +110 -0
  173. metadata +331 -0
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
data/docs/Address.md ADDED
@@ -0,0 +1,14 @@
1
+ # SezzleClient::Address
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **city** | **String** | |
7
+ **country_code** | **String** | |
8
+ **name** | **String** | | [optional]
9
+ **phone** | **String** | | [optional]
10
+ **postal_code** | **String** | |
11
+ **state** | **String** | |
12
+ **street** | **String** | |
13
+ **street2** | **String** | | [optional]
14
+
@@ -0,0 +1,13 @@
1
+ # SezzleClient::AllOfSessionCustomer
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **email** | **String** | | [optional]
7
+ **first_name** | **String** | | [optional]
8
+ **last_name** | **String** | | [optional]
9
+ **phone** | **String** | | [optional]
10
+ **dob** | **String** | | [optional]
11
+ **billing_address** | [**Address**](Address.md) | | [optional]
12
+ **shipping_address** | [**Address**](Address.md) | | [optional]
13
+
@@ -0,0 +1,18 @@
1
+ # SezzleClient::AllOfSessionOrder
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **reference_id** | **String** | | [optional]
7
+ **description** | **String** | | [optional]
8
+ **requires_shipping_info** | **BOOLEAN** | | [optional]
9
+ **items** | [**Array<LineItem>**](LineItem.md) | | [optional]
10
+ **discounts** | [**Array<Discount>**](Discount.md) | | [optional]
11
+ **metadata** | **Hash<String, String>** | | [optional]
12
+ **shipping_amount** | [**Price**](Price.md) | | [optional]
13
+ **tax_amount** | [**Price**](Price.md) | | [optional]
14
+ **checkout_expiration** | **DateTime** | | [optional]
15
+ **order_amount** | [**Price**](Price.md) | | [optional]
16
+ **checkout_financing_options** | [**Array<InstallmentPlan>**](InstallmentPlan.md) | *currently not supported, defaults to 4-pay-biweekly* | [optional]
17
+ **send_checkout_url** | [**Notification**](Notification.md) | | [optional]
18
+
@@ -0,0 +1,14 @@
1
+ # SezzleClient::Authorization
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **authorization_amount** | [**Price**](Price.md) | | [optional]
7
+ **approved** | **BOOLEAN** | | [optional]
8
+ **expiration** | **DateTime** | | [optional]
9
+ **releases** | [**Array<Capture>**](Capture.md) | | [optional]
10
+ **captures** | [**Array<Capture>**](Capture.md) | | [optional]
11
+ **refunds** | [**Array<Refund>**](Refund.md) | | [optional]
12
+ **uuid** | **String** | | [optional]
13
+ **links** | [**Array<Link>**](Link.md) | | [optional]
14
+
@@ -0,0 +1,52 @@
1
+ # SezzleClient::BearerAuthenticationApi
2
+
3
+ All URIs are relative to *//sandbox.gateway.sezzle.com/v2/*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**post_v1_authentication**](BearerAuthenticationApi.md#post_v1_authentication) | **POST** /authentication | Get bearer authentication token
8
+
9
+ # **post_v1_authentication**
10
+ > InlineResponse201 post_v1_authentication(body)
11
+
12
+ Get bearer authentication token
13
+
14
+ ### Example
15
+ ```ruby
16
+ # load the gem
17
+ require 'sezzle_client'
18
+
19
+ api_instance = SezzleClient::BearerAuthenticationApi.new
20
+ body = SezzleClient::Body.new # Body | Authentication request
21
+
22
+
23
+ begin
24
+ #Get bearer authentication token
25
+ result = api_instance.post_v1_authentication(body)
26
+ p result
27
+ rescue SezzleClient::ApiError => e
28
+ puts "Exception when calling BearerAuthenticationApi->post_v1_authentication: #{e}"
29
+ end
30
+ ```
31
+
32
+ ### Parameters
33
+
34
+ Name | Type | Description | Notes
35
+ ------------- | ------------- | ------------- | -------------
36
+ **body** | [**Body**](Body.md)| Authentication request |
37
+
38
+ ### Return type
39
+
40
+ [**InlineResponse201**](InlineResponse201.md)
41
+
42
+ ### Authorization
43
+
44
+ No authorization required
45
+
46
+ ### HTTP request headers
47
+
48
+ - **Content-Type**: application/json
49
+ - **Accept**: application/json
50
+
51
+
52
+
data/docs/Body.md ADDED
@@ -0,0 +1,8 @@
1
+ # SezzleClient::Body
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **private_key** | **String** | | [optional]
7
+ **public_key** | **String** | | [optional]
8
+
data/docs/Body1.md ADDED
@@ -0,0 +1,7 @@
1
+ # SezzleClient::Body1
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **reference_id** | **String** | | [optional]
7
+
data/docs/Body2.md ADDED
@@ -0,0 +1,6 @@
1
+ # SezzleClient::Body2
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
data/docs/Body3.md ADDED
@@ -0,0 +1,8 @@
1
+ # SezzleClient::Body3
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **capture_amount** | [**Price**](Price.md) | | [optional]
7
+ **partial_capture** | **BOOLEAN** | | [optional]
8
+
data/docs/Body4.md ADDED
@@ -0,0 +1,8 @@
1
+ # SezzleClient::Body4
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **intent** | [**Intent**](Intent.md) | | [optional]
7
+ **upcharge_amount** | [**Price**](Price.md) | | [optional]
8
+
data/docs/Capture.md ADDED
@@ -0,0 +1,8 @@
1
+ # SezzleClient::Capture
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **uuid** | **String** | | [optional]
7
+ **amount** | [**Price**](Price.md) | | [optional]
8
+
data/docs/Customer.md ADDED
@@ -0,0 +1,13 @@
1
+ # SezzleClient::Customer
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **email** | **String** | | [optional]
7
+ **first_name** | **String** | | [optional]
8
+ **last_name** | **String** | | [optional]
9
+ **phone** | **String** | | [optional]
10
+ **dob** | **String** | | [optional]
11
+ **billing_address** | [**Address**](Address.md) | | [optional]
12
+ **shipping_address** | [**Address**](Address.md) | | [optional]
13
+
@@ -0,0 +1,269 @@
1
+ # SezzleClient::CustomerApi
2
+
3
+ All URIs are relative to *//sandbox.gateway.sezzle.com/v2/*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_v2_token**](CustomerApi.md#delete_v2_token) | **DELETE** /customer/{customer_uuid} | Delete customer
8
+ [**get_v2_customer**](CustomerApi.md#get_v2_customer) | **GET** /customer/{customer_uuid} | Get customer
9
+ [**get_v2_customer_list**](CustomerApi.md#get_v2_customer_list) | **GET** /customer | Get list of customers
10
+ [**post_v2_customer_order**](CustomerApi.md#post_v2_customer_order) | **POST** /customer/{customer_uuid}/order | Create order by customer
11
+ [**preapprove_v2_token**](CustomerApi.md#preapprove_v2_token) | **POST** /customer/{customer_uuid}/preapprove | Preapprove amount by customer
12
+
13
+ # **delete_v2_token**
14
+ > delete_v2_token(customer_uuid)
15
+
16
+ Delete customer
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'sezzle_client'
22
+ # setup authorization
23
+ SezzleClient.configure do |config|
24
+ # Configure API key authorization: Bearer
25
+ config.api_key['Authorization'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Authorization'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = SezzleClient::CustomerApi.new
31
+ customer_uuid = 'customer_uuid_example' # String | Customer UUID
32
+
33
+
34
+ begin
35
+ #Delete customer
36
+ api_instance.delete_v2_token(customer_uuid)
37
+ rescue SezzleClient::ApiError => e
38
+ puts "Exception when calling CustomerApi->delete_v2_token: #{e}"
39
+ end
40
+ ```
41
+
42
+ ### Parameters
43
+
44
+ Name | Type | Description | Notes
45
+ ------------- | ------------- | ------------- | -------------
46
+ **customer_uuid** | **String**| Customer UUID |
47
+
48
+ ### Return type
49
+
50
+ nil (empty response body)
51
+
52
+ ### Authorization
53
+
54
+ [Bearer](../README.md#Bearer)
55
+
56
+ ### HTTP request headers
57
+
58
+ - **Content-Type**: Not defined
59
+ - **Accept**: application/json
60
+
61
+
62
+
63
+ # **get_v2_customer**
64
+ > InlineResponse2003 get_v2_customer(customer_uuid)
65
+
66
+ Get customer
67
+
68
+ ### Example
69
+ ```ruby
70
+ # load the gem
71
+ require 'sezzle_client'
72
+ # setup authorization
73
+ SezzleClient.configure do |config|
74
+ # Configure API key authorization: Bearer
75
+ config.api_key['Authorization'] = 'YOUR API KEY'
76
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
77
+ #config.api_key_prefix['Authorization'] = 'Bearer'
78
+ end
79
+
80
+ api_instance = SezzleClient::CustomerApi.new
81
+ customer_uuid = 'customer_uuid_example' # String | Customer UUID
82
+
83
+
84
+ begin
85
+ #Get customer
86
+ result = api_instance.get_v2_customer(customer_uuid)
87
+ p result
88
+ rescue SezzleClient::ApiError => e
89
+ puts "Exception when calling CustomerApi->get_v2_customer: #{e}"
90
+ end
91
+ ```
92
+
93
+ ### Parameters
94
+
95
+ Name | Type | Description | Notes
96
+ ------------- | ------------- | ------------- | -------------
97
+ **customer_uuid** | **String**| Customer UUID |
98
+
99
+ ### Return type
100
+
101
+ [**InlineResponse2003**](InlineResponse2003.md)
102
+
103
+ ### Authorization
104
+
105
+ [Bearer](../README.md#Bearer)
106
+
107
+ ### HTTP request headers
108
+
109
+ - **Content-Type**: Not defined
110
+ - **Accept**: application/json
111
+
112
+
113
+
114
+ # **get_v2_customer_list**
115
+ > Array<InlineResponse2002> get_v2_customer_list
116
+
117
+ Get list of customers
118
+
119
+ ### Example
120
+ ```ruby
121
+ # load the gem
122
+ require 'sezzle_client'
123
+ # setup authorization
124
+ SezzleClient.configure do |config|
125
+ # Configure API key authorization: Bearer
126
+ config.api_key['Authorization'] = 'YOUR API KEY'
127
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
128
+ #config.api_key_prefix['Authorization'] = 'Bearer'
129
+ end
130
+
131
+ api_instance = SezzleClient::CustomerApi.new
132
+
133
+ begin
134
+ #Get list of customers
135
+ result = api_instance.get_v2_customer_list
136
+ p result
137
+ rescue SezzleClient::ApiError => e
138
+ puts "Exception when calling CustomerApi->get_v2_customer_list: #{e}"
139
+ end
140
+ ```
141
+
142
+ ### Parameters
143
+ This endpoint does not need any parameter.
144
+
145
+ ### Return type
146
+
147
+ [**Array<InlineResponse2002>**](InlineResponse2002.md)
148
+
149
+ ### Authorization
150
+
151
+ [Bearer](../README.md#Bearer)
152
+
153
+ ### HTTP request headers
154
+
155
+ - **Content-Type**: Not defined
156
+ - **Accept**: application/json
157
+
158
+
159
+
160
+ # **post_v2_customer_order**
161
+ > InlineResponse2005 post_v2_customer_order(customer_uuid, opts)
162
+
163
+ Create order by customer
164
+
165
+ ### Example
166
+ ```ruby
167
+ # load the gem
168
+ require 'sezzle_client'
169
+ # setup authorization
170
+ SezzleClient.configure do |config|
171
+ # Configure API key authorization: Bearer
172
+ config.api_key['Authorization'] = 'YOUR API KEY'
173
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
174
+ #config.api_key_prefix['Authorization'] = 'Bearer'
175
+ end
176
+
177
+ api_instance = SezzleClient::CustomerApi.new
178
+ customer_uuid = 'customer_uuid_example' # String | Customer UUID
179
+ opts = {
180
+ body: SezzleClient::Body2.new # Body2 | Order request
181
+ sezzle_request_id: 'sezzle_request_id_example' # String | Unique client-generated ID to enforce idempotency
182
+ }
183
+
184
+ begin
185
+ #Create order by customer
186
+ result = api_instance.post_v2_customer_order(customer_uuid, opts)
187
+ p result
188
+ rescue SezzleClient::ApiError => e
189
+ puts "Exception when calling CustomerApi->post_v2_customer_order: #{e}"
190
+ end
191
+ ```
192
+
193
+ ### Parameters
194
+
195
+ Name | Type | Description | Notes
196
+ ------------- | ------------- | ------------- | -------------
197
+ **customer_uuid** | **String**| Customer UUID |
198
+ **body** | [**Body2**](Body2.md)| Order request | [optional]
199
+ **sezzle_request_id** | **String**| Unique client-generated ID to enforce idempotency | [optional]
200
+
201
+ ### Return type
202
+
203
+ [**InlineResponse2005**](InlineResponse2005.md)
204
+
205
+ ### Authorization
206
+
207
+ [Bearer](../README.md#Bearer)
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: application/json
212
+ - **Accept**: application/json
213
+
214
+
215
+
216
+ # **preapprove_v2_token**
217
+ > InlineResponse2004 preapprove_v2_token(customer_uuid, opts)
218
+
219
+ Preapprove amount by customer
220
+
221
+ ### Example
222
+ ```ruby
223
+ # load the gem
224
+ require 'sezzle_client'
225
+ # setup authorization
226
+ SezzleClient.configure do |config|
227
+ # Configure API key authorization: Bearer
228
+ config.api_key['Authorization'] = 'YOUR API KEY'
229
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
230
+ #config.api_key_prefix['Authorization'] = 'Bearer'
231
+ end
232
+
233
+ api_instance = SezzleClient::CustomerApi.new
234
+ customer_uuid = 'customer_uuid_example' # String | Customer UUID
235
+ opts = {
236
+ body: SezzleClient::Price.new # Price | Preapproval request
237
+ }
238
+
239
+ begin
240
+ #Preapprove amount by customer
241
+ result = api_instance.preapprove_v2_token(customer_uuid, opts)
242
+ p result
243
+ rescue SezzleClient::ApiError => e
244
+ puts "Exception when calling CustomerApi->preapprove_v2_token: #{e}"
245
+ end
246
+ ```
247
+
248
+ ### Parameters
249
+
250
+ Name | Type | Description | Notes
251
+ ------------- | ------------- | ------------- | -------------
252
+ **customer_uuid** | **String**| Customer UUID |
253
+ **body** | [**Price**](Price.md)| Preapproval request | [optional]
254
+
255
+ ### Return type
256
+
257
+ [**InlineResponse2004**](InlineResponse2004.md)
258
+
259
+ ### Authorization
260
+
261
+ [Bearer](../README.md#Bearer)
262
+
263
+ ### HTTP request headers
264
+
265
+ - **Content-Type**: application/json
266
+ - **Accept**: application/json
267
+
268
+
269
+