tremendous_ruby 5.19.0 → 5.20.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26ccbf5c8329f20f93653927a7cfcd4685e0b15119f23b51b65b9b1a6f6153b1
4
- data.tar.gz: f7a7ba276b7b39648bcebe8a80d70bfe89c6c9611a19acd778d81d1d576a2a49
3
+ metadata.gz: 02ecbafce1fc55589d3b416ae3489a4c04674519a9c21a7d72cfd1667bbb5333
4
+ data.tar.gz: 71caabaa5ab6a5c4a0bbee4a12e3af8de40cd3ea7484ef82169530d07e29d646
5
5
  SHA512:
6
- metadata.gz: aeb62f14e1932fa227b6b8dc653b8ad23f1020cfd5f8e1853226f224f834239c634412a2bb89589a95c39a11e6401f8e42741abf5488840fda997654f3e34407
7
- data.tar.gz: d172092aec79df15eef02a8703be711edcdb00e89cc9f5d755d6bc65fa97c98addab3a77b21dafbb33dd89f31104580d8b5221d5435b4f0c2cbecdad0d124757
6
+ metadata.gz: 9441002b229dee72d8f225e2ceebcd92f92d51996f1b60e2dc107231d850035d65cf92b9522e30021c67c1dc1fb49ea54b82ba436a934a1fb753da5f211afb11
7
+ data.tar.gz: 0134b0d72202f98f7cbe821bd56c5d0c9a7db597fb73935c93dbb8f14f6457bebd25f999f46b5d8bd391eaff37131a4d4a3d32b65fd085042c0153f0167890d2
@@ -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\">currency</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the invoice</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>
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&#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>
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&#39;s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account&#39;s balance ## Request body &lt;div class&#x3D;\&quot;object-schema-request-schema\&quot;&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Property&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody class&#x3D;\&quot;object-schema-table-body\&quot;&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;po_number&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Reference to the purchase order number within your organization&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;amount&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;number&lt;/span&gt; &lt;span class&#x3D;\&quot;property-format\&quot;&gt;double&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Amount of the invoice&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;currency&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Currency of the invoice&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;memo&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;
633
+ # Creating an invoice is the way for your organization to fund your account&#39;s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account&#39;s balance ## Request body &lt;div class&#x3D;\&quot;object-schema-request-schema\&quot;&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Property&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody class&#x3D;\&quot;object-schema-table-body\&quot;&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;po_number&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Reference to the purchase order number within your organization&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;amount&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;number&lt;/span&gt; &lt;span class&#x3D;\&quot;property-format\&quot;&gt;double&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Amount of the invoice&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;currency_code&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Currency of the invoice. Defaults to the organization&amp;#39;s currency if not provided.&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;currency&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Deprecated: Use &lt;code&gt;currency_code&lt;/code&gt; instead.&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr class&#x3D;\&quot;\&quot;&gt;&lt;td&gt;&lt;div class&#x3D;\&quot;property-name\&quot;&gt; &lt;code class&#x3D;\&quot;property-name\&quot;&gt;memo&lt;/code&gt; &lt;/div&gt; &lt;/td&gt;&lt;td&gt;&lt;span class&#x3D;\&quot;property-type\&quot;&gt;string&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;
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
@@ -1,3 +1,3 @@
1
1
  module Tremendous
2
- VERSION = "5.19.0"
2
+ VERSION = "5.20.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tremendous_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.19.0
4
+ version: 5.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tremendous Developers