tremendous_ruby 5.19.0 → 5.21.0
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 +4 -4
- data/lib/tremendous/api/tremendous_api.rb +2 -2
- data/lib/tremendous/models/create_invoice_request.rb +24 -4
- data/lib/tremendous/models/invoice.rb +23 -3
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +23 -3
- data/lib/tremendous/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e1b3b289fa165e9aad09ff4db72e7d5a4cd7fee02df49e0e1e3900bdffa8169
|
|
4
|
+
data.tar.gz: 07e4346741282945c335770ea4efcdd45ef877621990a7e3857d5a80fe03b661
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5de40b45138974a56921e645a6134d638bb7d3a7f1fe5cde6e3da631394e978edd49e8f393bb3b436a91eeeb141e81ac87bd22924d7a5f8a309ea9bb7ef93594
|
|
7
|
+
data.tar.gz: 4bdbe2f69085434cd50e847df92c62e1d790881c0cbe6b2592dda87af5de4113bf473555b6465f5e27ec3643b9da0e852eaf61db9bb5320d92129f0d7ebb4ccc
|
|
@@ -620,7 +620,7 @@ module Tremendous
|
|
|
620
620
|
end
|
|
621
621
|
|
|
622
622
|
# Create invoice
|
|
623
|
-
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">
|
|
623
|
+
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the invoice. Defaults to the organization's currency if not provided.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Deprecated: Use <code>currency_code</code> instead.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
|
|
624
624
|
# @param create_invoice_request [CreateInvoiceRequest] Invoice details
|
|
625
625
|
# @param [Hash] opts the optional parameters
|
|
626
626
|
# @return [CreateInvoice200Response]
|
|
@@ -630,7 +630,7 @@ module Tremendous
|
|
|
630
630
|
end
|
|
631
631
|
|
|
632
632
|
# Create invoice
|
|
633
|
-
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">
|
|
633
|
+
# Creating an invoice is the way for your organization to fund your account's balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account's balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the invoice. Defaults to the organization&#39;s currency if not provided.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Deprecated: Use <code>currency_code</code> instead.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
|
|
634
634
|
# @param create_invoice_request [CreateInvoiceRequest] Invoice details
|
|
635
635
|
# @param [Hash] opts the optional parameters
|
|
636
636
|
# @return [Array<(CreateInvoice200Response, Integer, Hash)>] CreateInvoice200Response data, response status code and response headers
|
|
@@ -21,7 +21,10 @@ module Tremendous
|
|
|
21
21
|
# Amount of the invoice
|
|
22
22
|
attr_accessor :amount
|
|
23
23
|
|
|
24
|
-
# Currency of the invoice
|
|
24
|
+
# Currency of the invoice. Defaults to the organization's currency if not provided.
|
|
25
|
+
attr_accessor :currency_code
|
|
26
|
+
|
|
27
|
+
# Deprecated: Use `currency_code` instead.
|
|
25
28
|
attr_accessor :currency
|
|
26
29
|
|
|
27
30
|
# A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.
|
|
@@ -54,6 +57,7 @@ module Tremendous
|
|
|
54
57
|
{
|
|
55
58
|
:'po_number' => :'po_number',
|
|
56
59
|
:'amount' => :'amount',
|
|
60
|
+
:'currency_code' => :'currency_code',
|
|
57
61
|
:'currency' => :'currency',
|
|
58
62
|
:'memo' => :'memo'
|
|
59
63
|
}
|
|
@@ -74,6 +78,7 @@ module Tremendous
|
|
|
74
78
|
{
|
|
75
79
|
:'po_number' => :'String',
|
|
76
80
|
:'amount' => :'Float',
|
|
81
|
+
:'currency_code' => :'String',
|
|
77
82
|
:'currency' => :'String',
|
|
78
83
|
:'memo' => :'String'
|
|
79
84
|
}
|
|
@@ -113,10 +118,12 @@ module Tremendous
|
|
|
113
118
|
self.amount = nil
|
|
114
119
|
end
|
|
115
120
|
|
|
121
|
+
if attributes.key?(:'currency_code')
|
|
122
|
+
self.currency_code = attributes[:'currency_code']
|
|
123
|
+
end
|
|
124
|
+
|
|
116
125
|
if attributes.key?(:'currency')
|
|
117
126
|
self.currency = attributes[:'currency']
|
|
118
|
-
else
|
|
119
|
-
self.currency = 'USD'
|
|
120
127
|
end
|
|
121
128
|
|
|
122
129
|
if attributes.key?(:'memo')
|
|
@@ -141,6 +148,8 @@ module Tremendous
|
|
|
141
148
|
def valid?
|
|
142
149
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
143
150
|
return false if @amount.nil?
|
|
151
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
152
|
+
return false unless currency_code_validator.valid?(@currency_code)
|
|
144
153
|
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
145
154
|
return false unless currency_validator.valid?(@currency)
|
|
146
155
|
true
|
|
@@ -156,6 +165,16 @@ module Tremendous
|
|
|
156
165
|
@amount = amount
|
|
157
166
|
end
|
|
158
167
|
|
|
168
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
169
|
+
# @param [Object] currency_code Object to be assigned
|
|
170
|
+
def currency_code=(currency_code)
|
|
171
|
+
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
172
|
+
unless validator.valid?(currency_code)
|
|
173
|
+
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
174
|
+
end
|
|
175
|
+
@currency_code = currency_code
|
|
176
|
+
end
|
|
177
|
+
|
|
159
178
|
# Custom attribute writer method checking allowed values (enum).
|
|
160
179
|
# @param [Object] currency Object to be assigned
|
|
161
180
|
def currency=(currency)
|
|
@@ -173,6 +192,7 @@ module Tremendous
|
|
|
173
192
|
self.class == o.class &&
|
|
174
193
|
po_number == o.po_number &&
|
|
175
194
|
amount == o.amount &&
|
|
195
|
+
currency_code == o.currency_code &&
|
|
176
196
|
currency == o.currency &&
|
|
177
197
|
memo == o.memo
|
|
178
198
|
end
|
|
@@ -186,7 +206,7 @@ module Tremendous
|
|
|
186
206
|
# Calculates hash code according to all attributes.
|
|
187
207
|
# @return [Integer] Hash code
|
|
188
208
|
def hash
|
|
189
|
-
[po_number, amount, currency, memo].hash
|
|
209
|
+
[po_number, amount, currency_code, currency, memo].hash
|
|
190
210
|
end
|
|
191
211
|
|
|
192
212
|
# Builds the object from hash
|
|
@@ -26,6 +26,9 @@ module Tremendous
|
|
|
26
26
|
attr_accessor :amount
|
|
27
27
|
|
|
28
28
|
# Currency of the invoice
|
|
29
|
+
attr_accessor :currency_code
|
|
30
|
+
|
|
31
|
+
# Deprecated: Use `currency_code` instead.
|
|
29
32
|
attr_accessor :currency
|
|
30
33
|
|
|
31
34
|
attr_accessor :international
|
|
@@ -73,6 +76,7 @@ module Tremendous
|
|
|
73
76
|
:'id' => :'id',
|
|
74
77
|
:'po_number' => :'po_number',
|
|
75
78
|
:'amount' => :'amount',
|
|
79
|
+
:'currency_code' => :'currency_code',
|
|
76
80
|
:'currency' => :'currency',
|
|
77
81
|
:'international' => :'international',
|
|
78
82
|
:'status' => :'status',
|
|
@@ -99,6 +103,7 @@ module Tremendous
|
|
|
99
103
|
:'id' => :'String',
|
|
100
104
|
:'po_number' => :'String',
|
|
101
105
|
:'amount' => :'Float',
|
|
106
|
+
:'currency_code' => :'String',
|
|
102
107
|
:'currency' => :'String',
|
|
103
108
|
:'international' => :'Boolean',
|
|
104
109
|
:'status' => :'String',
|
|
@@ -149,10 +154,12 @@ module Tremendous
|
|
|
149
154
|
self.amount = nil
|
|
150
155
|
end
|
|
151
156
|
|
|
157
|
+
if attributes.key?(:'currency_code')
|
|
158
|
+
self.currency_code = attributes[:'currency_code']
|
|
159
|
+
end
|
|
160
|
+
|
|
152
161
|
if attributes.key?(:'currency')
|
|
153
162
|
self.currency = attributes[:'currency']
|
|
154
|
-
else
|
|
155
|
-
self.currency = 'USD'
|
|
156
163
|
end
|
|
157
164
|
|
|
158
165
|
if attributes.key?(:'international')
|
|
@@ -220,6 +227,8 @@ module Tremendous
|
|
|
220
227
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
221
228
|
return false if @id.nil?
|
|
222
229
|
return false if @amount.nil?
|
|
230
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
231
|
+
return false unless currency_code_validator.valid?(@currency_code)
|
|
223
232
|
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
224
233
|
return false unless currency_validator.valid?(@currency)
|
|
225
234
|
return false if @status.nil?
|
|
@@ -249,6 +258,16 @@ module Tremendous
|
|
|
249
258
|
@amount = amount
|
|
250
259
|
end
|
|
251
260
|
|
|
261
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
262
|
+
# @param [Object] currency_code Object to be assigned
|
|
263
|
+
def currency_code=(currency_code)
|
|
264
|
+
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
265
|
+
unless validator.valid?(currency_code)
|
|
266
|
+
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
267
|
+
end
|
|
268
|
+
@currency_code = currency_code
|
|
269
|
+
end
|
|
270
|
+
|
|
252
271
|
# Custom attribute writer method checking allowed values (enum).
|
|
253
272
|
# @param [Object] currency Object to be assigned
|
|
254
273
|
def currency=(currency)
|
|
@@ -287,6 +306,7 @@ module Tremendous
|
|
|
287
306
|
id == o.id &&
|
|
288
307
|
po_number == o.po_number &&
|
|
289
308
|
amount == o.amount &&
|
|
309
|
+
currency_code == o.currency_code &&
|
|
290
310
|
currency == o.currency &&
|
|
291
311
|
international == o.international &&
|
|
292
312
|
status == o.status &&
|
|
@@ -305,7 +325,7 @@ module Tremendous
|
|
|
305
325
|
# Calculates hash code according to all attributes.
|
|
306
326
|
# @return [Integer] Hash code
|
|
307
327
|
def hash
|
|
308
|
-
[id, po_number, amount, currency, international, status, orders, rewards, created_at, paid_at].hash
|
|
328
|
+
[id, po_number, amount, currency_code, currency, international, status, orders, rewards, created_at, paid_at].hash
|
|
309
329
|
end
|
|
310
330
|
|
|
311
331
|
# Builds the object from hash
|
|
@@ -26,6 +26,9 @@ module Tremendous
|
|
|
26
26
|
attr_accessor :amount
|
|
27
27
|
|
|
28
28
|
# Currency of the invoice
|
|
29
|
+
attr_accessor :currency_code
|
|
30
|
+
|
|
31
|
+
# Deprecated: Use `currency_code` instead.
|
|
29
32
|
attr_accessor :currency
|
|
30
33
|
|
|
31
34
|
attr_accessor :international
|
|
@@ -73,6 +76,7 @@ module Tremendous
|
|
|
73
76
|
:'id' => :'id',
|
|
74
77
|
:'po_number' => :'po_number',
|
|
75
78
|
:'amount' => :'amount',
|
|
79
|
+
:'currency_code' => :'currency_code',
|
|
76
80
|
:'currency' => :'currency',
|
|
77
81
|
:'international' => :'international',
|
|
78
82
|
:'status' => :'status',
|
|
@@ -99,6 +103,7 @@ module Tremendous
|
|
|
99
103
|
:'id' => :'String',
|
|
100
104
|
:'po_number' => :'String',
|
|
101
105
|
:'amount' => :'Float',
|
|
106
|
+
:'currency_code' => :'String',
|
|
102
107
|
:'currency' => :'String',
|
|
103
108
|
:'international' => :'Boolean',
|
|
104
109
|
:'status' => :'String',
|
|
@@ -149,10 +154,12 @@ module Tremendous
|
|
|
149
154
|
self.amount = nil
|
|
150
155
|
end
|
|
151
156
|
|
|
157
|
+
if attributes.key?(:'currency_code')
|
|
158
|
+
self.currency_code = attributes[:'currency_code']
|
|
159
|
+
end
|
|
160
|
+
|
|
152
161
|
if attributes.key?(:'currency')
|
|
153
162
|
self.currency = attributes[:'currency']
|
|
154
|
-
else
|
|
155
|
-
self.currency = 'USD'
|
|
156
163
|
end
|
|
157
164
|
|
|
158
165
|
if attributes.key?(:'international')
|
|
@@ -220,6 +227,8 @@ module Tremendous
|
|
|
220
227
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
221
228
|
return false if @id.nil?
|
|
222
229
|
return false if @amount.nil?
|
|
230
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
231
|
+
return false unless currency_code_validator.valid?(@currency_code)
|
|
223
232
|
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
224
233
|
return false unless currency_validator.valid?(@currency)
|
|
225
234
|
return false if @status.nil?
|
|
@@ -249,6 +258,16 @@ module Tremendous
|
|
|
249
258
|
@amount = amount
|
|
250
259
|
end
|
|
251
260
|
|
|
261
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
262
|
+
# @param [Object] currency_code Object to be assigned
|
|
263
|
+
def currency_code=(currency_code)
|
|
264
|
+
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
265
|
+
unless validator.valid?(currency_code)
|
|
266
|
+
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
267
|
+
end
|
|
268
|
+
@currency_code = currency_code
|
|
269
|
+
end
|
|
270
|
+
|
|
252
271
|
# Custom attribute writer method checking allowed values (enum).
|
|
253
272
|
# @param [Object] currency Object to be assigned
|
|
254
273
|
def currency=(currency)
|
|
@@ -287,6 +306,7 @@ module Tremendous
|
|
|
287
306
|
id == o.id &&
|
|
288
307
|
po_number == o.po_number &&
|
|
289
308
|
amount == o.amount &&
|
|
309
|
+
currency_code == o.currency_code &&
|
|
290
310
|
currency == o.currency &&
|
|
291
311
|
international == o.international &&
|
|
292
312
|
status == o.status &&
|
|
@@ -305,7 +325,7 @@ module Tremendous
|
|
|
305
325
|
# Calculates hash code according to all attributes.
|
|
306
326
|
# @return [Integer] Hash code
|
|
307
327
|
def hash
|
|
308
|
-
[id, po_number, amount, currency, international, status, orders, rewards, created_at, paid_at].hash
|
|
328
|
+
[id, po_number, amount, currency_code, currency, international, status, orders, rewards, created_at, paid_at].hash
|
|
309
329
|
end
|
|
310
330
|
|
|
311
331
|
# Builds the object from hash
|
data/lib/tremendous/version.rb
CHANGED