tremendous_ruby 5.18.1 → 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 +4 -4
- data/lib/tremendous/api/tremendous_api.rb +128 -2
- data/lib/tremendous/models/create_invoice_request.rb +24 -4
- 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: 02ecbafce1fc55589d3b416ae3489a4c04674519a9c21a7d72cfd1667bbb5333
|
|
4
|
+
data.tar.gz: 71caabaa5ab6a5c4a0bbee4a12e3af8de40cd3ea7484ef82169530d07e29d646
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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\">
|
|
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
|
|
@@ -1089,6 +1089,132 @@ module Tremendous
|
|
|
1089
1089
|
return data, status_code, headers
|
|
1090
1090
|
end
|
|
1091
1091
|
|
|
1092
|
+
# Delete a connected organization
|
|
1093
|
+
# Deletes a connected organization and revokes the associated OAuth connection. The underlying Tremendous organization is not affected and remains accessible.
|
|
1094
|
+
# @param id [String] ID of the connected organization to delete.
|
|
1095
|
+
# @param [Hash] opts the optional parameters
|
|
1096
|
+
# @return [CreateConnectedOrganization200Response]
|
|
1097
|
+
def delete_connected_organization(id, opts = {})
|
|
1098
|
+
data, _status_code, _headers = delete_connected_organization_with_http_info(id, opts)
|
|
1099
|
+
data
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1102
|
+
# Delete a connected organization
|
|
1103
|
+
# Deletes a connected organization and revokes the associated OAuth connection. The underlying Tremendous organization is not affected and remains accessible.
|
|
1104
|
+
# @param id [String] ID of the connected organization to delete.
|
|
1105
|
+
# @param [Hash] opts the optional parameters
|
|
1106
|
+
# @return [Array<(CreateConnectedOrganization200Response, Integer, Hash)>] CreateConnectedOrganization200Response data, response status code and response headers
|
|
1107
|
+
def delete_connected_organization_with_http_info(id, opts = {})
|
|
1108
|
+
if @api_client.config.debugging
|
|
1109
|
+
@api_client.config.logger.debug 'Calling API: TremendousApi.delete_connected_organization ...'
|
|
1110
|
+
end
|
|
1111
|
+
# verify the required parameter 'id' is set
|
|
1112
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1113
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.delete_connected_organization"
|
|
1114
|
+
end
|
|
1115
|
+
# resource path
|
|
1116
|
+
local_var_path = '/connected_organizations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1117
|
+
|
|
1118
|
+
# query parameters
|
|
1119
|
+
query_params = opts[:query_params] || {}
|
|
1120
|
+
|
|
1121
|
+
# header parameters
|
|
1122
|
+
header_params = opts[:header_params] || {}
|
|
1123
|
+
# HTTP header 'Accept' (if needed)
|
|
1124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1125
|
+
|
|
1126
|
+
# form parameters
|
|
1127
|
+
form_params = opts[:form_params] || {}
|
|
1128
|
+
|
|
1129
|
+
# http body (model)
|
|
1130
|
+
post_body = opts[:debug_body]
|
|
1131
|
+
|
|
1132
|
+
# return_type
|
|
1133
|
+
return_type = opts[:debug_return_type] || 'CreateConnectedOrganization200Response'
|
|
1134
|
+
|
|
1135
|
+
# auth_names
|
|
1136
|
+
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
|
|
1137
|
+
|
|
1138
|
+
new_options = opts.merge(
|
|
1139
|
+
:operation => :"TremendousApi.delete_connected_organization",
|
|
1140
|
+
:header_params => header_params,
|
|
1141
|
+
:query_params => query_params,
|
|
1142
|
+
:form_params => form_params,
|
|
1143
|
+
:body => post_body,
|
|
1144
|
+
:auth_names => auth_names,
|
|
1145
|
+
:return_type => return_type
|
|
1146
|
+
)
|
|
1147
|
+
|
|
1148
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1149
|
+
if @api_client.config.debugging
|
|
1150
|
+
@api_client.config.logger.debug "API called: TremendousApi#delete_connected_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1151
|
+
end
|
|
1152
|
+
return data, status_code, headers
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
# Remove a connected organization member
|
|
1156
|
+
# Removes a connected organization member. If the member has completed registration and has an associated Tremendous member, that membership is also revoked. The connected organization itself is not affected.
|
|
1157
|
+
# @param id [String] ID of the connected organization member to remove.
|
|
1158
|
+
# @param [Hash] opts the optional parameters
|
|
1159
|
+
# @return [CreateConnectedOrganizationMember200Response]
|
|
1160
|
+
def delete_connected_organization_member(id, opts = {})
|
|
1161
|
+
data, _status_code, _headers = delete_connected_organization_member_with_http_info(id, opts)
|
|
1162
|
+
data
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
# Remove a connected organization member
|
|
1166
|
+
# Removes a connected organization member. If the member has completed registration and has an associated Tremendous member, that membership is also revoked. The connected organization itself is not affected.
|
|
1167
|
+
# @param id [String] ID of the connected organization member to remove.
|
|
1168
|
+
# @param [Hash] opts the optional parameters
|
|
1169
|
+
# @return [Array<(CreateConnectedOrganizationMember200Response, Integer, Hash)>] CreateConnectedOrganizationMember200Response data, response status code and response headers
|
|
1170
|
+
def delete_connected_organization_member_with_http_info(id, opts = {})
|
|
1171
|
+
if @api_client.config.debugging
|
|
1172
|
+
@api_client.config.logger.debug 'Calling API: TremendousApi.delete_connected_organization_member ...'
|
|
1173
|
+
end
|
|
1174
|
+
# verify the required parameter 'id' is set
|
|
1175
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1176
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TremendousApi.delete_connected_organization_member"
|
|
1177
|
+
end
|
|
1178
|
+
# resource path
|
|
1179
|
+
local_var_path = '/connected_organization_members/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1180
|
+
|
|
1181
|
+
# query parameters
|
|
1182
|
+
query_params = opts[:query_params] || {}
|
|
1183
|
+
|
|
1184
|
+
# header parameters
|
|
1185
|
+
header_params = opts[:header_params] || {}
|
|
1186
|
+
# HTTP header 'Accept' (if needed)
|
|
1187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1188
|
+
|
|
1189
|
+
# form parameters
|
|
1190
|
+
form_params = opts[:form_params] || {}
|
|
1191
|
+
|
|
1192
|
+
# http body (model)
|
|
1193
|
+
post_body = opts[:debug_body]
|
|
1194
|
+
|
|
1195
|
+
# return_type
|
|
1196
|
+
return_type = opts[:debug_return_type] || 'CreateConnectedOrganizationMember200Response'
|
|
1197
|
+
|
|
1198
|
+
# auth_names
|
|
1199
|
+
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
|
|
1200
|
+
|
|
1201
|
+
new_options = opts.merge(
|
|
1202
|
+
:operation => :"TremendousApi.delete_connected_organization_member",
|
|
1203
|
+
:header_params => header_params,
|
|
1204
|
+
:query_params => query_params,
|
|
1205
|
+
:form_params => form_params,
|
|
1206
|
+
:body => post_body,
|
|
1207
|
+
:auth_names => auth_names,
|
|
1208
|
+
:return_type => return_type
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1212
|
+
if @api_client.config.debugging
|
|
1213
|
+
@api_client.config.logger.debug "API called: TremendousApi#delete_connected_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1214
|
+
end
|
|
1215
|
+
return data, status_code, headers
|
|
1216
|
+
end
|
|
1217
|
+
|
|
1092
1218
|
# Delete fraud rule
|
|
1093
1219
|
# Deletes the rule of the type passed in the URL.
|
|
1094
1220
|
# @param rule_type [String] The rule type to create or update.
|
|
@@ -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
|
data/lib/tremendous/version.rb
CHANGED