sezzle_client 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
#Sezzle API
|
3
|
+
|
4
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.25
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module SezzleClient
|
15
|
+
class Webhook
|
16
|
+
attr_accessor :url
|
17
|
+
|
18
|
+
attr_accessor :events
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'url' => :'url',
|
24
|
+
:'events' => :'events'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'url' => :'Object',
|
32
|
+
:'events' => :'Object'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# List of attributes with nullable: true
|
37
|
+
def self.openapi_nullable
|
38
|
+
Set.new([
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SezzleClient::Webhook` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SezzleClient::Webhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'url')
|
58
|
+
self.url = attributes[:'url']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.key?(:'events')
|
62
|
+
if (value = attributes[:'events']).is_a?(Array)
|
63
|
+
self.events = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
+
# @return Array for valid properties with the reasons
|
70
|
+
def list_invalid_properties
|
71
|
+
invalid_properties = Array.new
|
72
|
+
if @url.nil?
|
73
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
74
|
+
end
|
75
|
+
|
76
|
+
invalid_properties
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return false if @url.nil?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
url == o.url &&
|
92
|
+
events == o.events
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[url, events].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.openapi_types.each_pair do |key, type|
|
120
|
+
if type =~ /\AArray<(.*)>/i
|
121
|
+
# check to ensure the input is an array given that the attribute
|
122
|
+
# is documented as an array but the input is not
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
125
|
+
end
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
128
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
129
|
+
self.send("#{key}=", nil)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
SezzleClient.const_get(type).build_from_hash(value)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the string representation of the object
|
178
|
+
# @return [String] String presentation of the object
|
179
|
+
def to_s
|
180
|
+
to_hash.to_s
|
181
|
+
end
|
182
|
+
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_body
|
186
|
+
to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = self.send(attr)
|
195
|
+
if value.nil?
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
|
+
end
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end end
|
222
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
=begin
|
2
|
+
#Sezzle API
|
3
|
+
|
4
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.25
|
10
|
+
=end
|
11
|
+
|
12
|
+
module SezzleClient
|
13
|
+
VERSION = '1.0.1'
|
14
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Sezzle API
|
5
|
+
|
6
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
7
|
+
|
8
|
+
OpenAPI spec version: 2.0.0
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 3.0.25
|
12
|
+
=end
|
13
|
+
|
14
|
+
$:.push File.expand_path("../lib", __FILE__)
|
15
|
+
require "sezzle_client/version"
|
16
|
+
|
17
|
+
Gem::Specification.new do |s|
|
18
|
+
s.name = "sezzle_client"
|
19
|
+
s.version = SezzleClient::VERSION
|
20
|
+
s.platform = Gem::Platform::RUBY
|
21
|
+
s.authors = ["Swagger-Codegen"]
|
22
|
+
s.email = [""]
|
23
|
+
s.homepage = "https://github.com/swagger-api/swagger-codegen"
|
24
|
+
s.summary = "Sezzle API Ruby Gem"
|
25
|
+
s.description = "The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option."
|
26
|
+
s.license = "Unlicense"
|
27
|
+
s.required_ruby_version = ">= 1.9"
|
28
|
+
|
29
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
30
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
31
|
+
|
32
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
33
|
+
|
34
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
35
|
+
s.test_files = `find spec/*`.split("\n")
|
36
|
+
s.executables = []
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
end
|
data/spec/.DS_Store
ADDED
Binary file
|
@@ -0,0 +1,45 @@
|
|
1
|
+
=begin
|
2
|
+
#Sezzle API
|
3
|
+
|
4
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.25
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'spec_helper'
|
13
|
+
require 'json'
|
14
|
+
|
15
|
+
# Unit tests for SezzleClient::BearerAuthenticationApi
|
16
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'BearerAuthenticationApi' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = SezzleClient::BearerAuthenticationApi.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of BearerAuthenticationApi' do
|
29
|
+
it 'should create an instance of BearerAuthenticationApi' do
|
30
|
+
expect(@instance).to be_instance_of(SezzleClient::BearerAuthenticationApi)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# unit tests for post_v1_authentication
|
35
|
+
# Get bearer authentication token
|
36
|
+
# @param body Authentication request
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [InlineResponse201]
|
39
|
+
describe 'post_v1_authentication test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
=begin
|
2
|
+
#Sezzle API
|
3
|
+
|
4
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.25
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'spec_helper'
|
13
|
+
require 'json'
|
14
|
+
|
15
|
+
# Unit tests for SezzleClient::CustomerApi
|
16
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CustomerApi' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = SezzleClient::CustomerApi.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CustomerApi' do
|
29
|
+
it 'should create an instance of CustomerApi' do
|
30
|
+
expect(@instance).to be_instance_of(SezzleClient::CustomerApi)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# unit tests for delete_v2_token
|
35
|
+
# Delete customer
|
36
|
+
# @param customer_uuid Customer UUID
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [nil]
|
39
|
+
describe 'delete_v2_token test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# unit tests for get_v2_customer
|
46
|
+
# Get customer
|
47
|
+
# @param customer_uuid Customer UUID
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @return [InlineResponse2003]
|
50
|
+
describe 'get_v2_customer test' do
|
51
|
+
it 'should work' do
|
52
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# unit tests for get_v2_customer_list
|
57
|
+
# Get list of customers
|
58
|
+
# @param [Hash] opts the optional parameters
|
59
|
+
# @return [Array<InlineResponse2002>]
|
60
|
+
describe 'get_v2_customer_list test' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# unit tests for post_v2_customer_order
|
67
|
+
# Create order by customer
|
68
|
+
# @param customer_uuid Customer UUID
|
69
|
+
# @param [Hash] opts the optional parameters
|
70
|
+
# @option opts [Body2] :body Order request
|
71
|
+
# @option opts [String] :sezzle_request_id Unique client-generated ID to enforce idempotency
|
72
|
+
# @return [InlineResponse2005]
|
73
|
+
describe 'post_v2_customer_order test' do
|
74
|
+
it 'should work' do
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# unit tests for preapprove_v2_token
|
80
|
+
# Preapprove amount by customer
|
81
|
+
# @param customer_uuid Customer UUID
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [Price] :body Preapproval request
|
84
|
+
# @return [InlineResponse2004]
|
85
|
+
describe 'preapprove_v2_token test' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
=begin
|
2
|
+
#Sezzle API
|
3
|
+
|
4
|
+
#The Sezzle API is intended for merchants interested in accepting Sezzle Pay as a payment option.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.25
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'spec_helper'
|
13
|
+
require 'json'
|
14
|
+
|
15
|
+
# Unit tests for SezzleClient::OrderApi
|
16
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'OrderApi' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = SezzleClient::OrderApi.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of OrderApi' do
|
29
|
+
it 'should create an instance of OrderApi' do
|
30
|
+
expect(@instance).to be_instance_of(SezzleClient::OrderApi)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# unit tests for get_v2_order
|
35
|
+
# Get order details
|
36
|
+
# @param order_uuid Order UUID
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [InlineResponse2001]
|
39
|
+
describe 'get_v2_order test' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# unit tests for patch_v2_checkout
|
46
|
+
# Update order
|
47
|
+
# @param body Session request
|
48
|
+
# @param order_uuid Order UUID
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [nil]
|
51
|
+
describe 'patch_v2_checkout test' do
|
52
|
+
it 'should work' do
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for post_v2_capture_by_order
|
58
|
+
# Capture amount by order
|
59
|
+
# @param order_uuid Order UUID
|
60
|
+
# @param [Hash] opts the optional parameters
|
61
|
+
# @option opts [Body3] :body Capture request
|
62
|
+
# @return [InlineResponse2006]
|
63
|
+
describe 'post_v2_capture_by_order test' do
|
64
|
+
it 'should work' do
|
65
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# unit tests for post_v2_reauthorize_by_order
|
70
|
+
# Reauthorize amount by order
|
71
|
+
# ### DEVELOPER PREVIEW *This API is subject to change and limited to select merchants. Bug fixes and new features will be released based on feedback throughout the preview period.* - Requires customer object on Create Session with at minimum `{ tokenize: true }` - Response will be a new order and its `uuid` can be used on the Order API endpoints
|
72
|
+
# @param order_uuid Order UUID
|
73
|
+
# @param [Hash] opts the optional parameters
|
74
|
+
# @option opts [Price] :body Reauthorize request
|
75
|
+
# @return [InlineResponse2007]
|
76
|
+
describe 'post_v2_reauthorize_by_order test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# unit tests for post_v2_refund_by_order
|
83
|
+
# Refund amount by order
|
84
|
+
# @param order_uuid Order UUID
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [Price] :body Refund request
|
87
|
+
# @return [InlineResponse2006]
|
88
|
+
describe 'post_v2_refund_by_order test' do
|
89
|
+
it 'should work' do
|
90
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# unit tests for post_v2_release_by_order
|
95
|
+
# Release amount by order
|
96
|
+
# @param order_uuid Order UUID
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Price] :body Release request
|
99
|
+
# @return [InlineResponse2006]
|
100
|
+
describe 'post_v2_release_by_order test' do
|
101
|
+
it 'should work' do
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# unit tests for post_v2_upcharge_by_order
|
107
|
+
# Upcharge amount by order
|
108
|
+
# ### DEVELOPER PREVIEW *This API is subject to change and limited to select merchants. Bug fixes and new features will be released based on feedback throughout the preview period.* - This endpoint is not live and will return a `501 Not Implemented`
|
109
|
+
# @param order_uuid Order UUID
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [Body4] :body Upcharge request
|
112
|
+
# @return [InlineResponse2007]
|
113
|
+
describe 'post_v2_upcharge_by_order test' do
|
114
|
+
it 'should work' do
|
115
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|