mundi_api 0.9.1 → 0.13.7
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/README.md +1755 -698
- data/lib/mundi_api.rb +75 -35
- data/lib/mundi_api/api_helper.rb +59 -7
- data/lib/mundi_api/controllers/charges_controller.rb +136 -97
- data/lib/mundi_api/controllers/customers_controller.rb +264 -253
- data/lib/mundi_api/controllers/invoices_controller.rb +97 -23
- data/lib/mundi_api/controllers/orders_controller.rb +247 -30
- data/lib/mundi_api/controllers/plans_controller.rb +108 -106
- data/lib/mundi_api/controllers/recipients_controller.rb +571 -0
- data/lib/mundi_api/controllers/sellers_controller.rb +244 -0
- data/lib/mundi_api/controllers/subscriptions_controller.rb +298 -108
- data/lib/mundi_api/models/create_access_token_request.rb +7 -9
- data/lib/mundi_api/models/create_address_request.rb +30 -14
- data/lib/mundi_api/models/create_anticipation_request.rb +53 -0
- data/lib/mundi_api/models/create_bank_account_request.rb +114 -0
- data/lib/mundi_api/models/create_bank_transfer_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_boleto_payment_request.rb +18 -11
- data/lib/mundi_api/models/create_cancel_charge_request.rb +2 -4
- data/lib/mundi_api/models/create_cancel_subscription_request.rb +2 -4
- data/lib/mundi_api/models/create_capture_charge_request.rb +3 -5
- data/lib/mundi_api/models/create_card_options_request.rb +2 -4
- data/lib/mundi_api/models/create_card_request.rb +24 -17
- data/lib/mundi_api/models/create_card_token_request.rb +7 -9
- data/lib/mundi_api/models/create_charge_request.rb +8 -10
- data/lib/mundi_api/models/create_checkout_boleto_payment_request.rb +4 -6
- data/lib/mundi_api/models/create_checkout_card_installment_option_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_card_payment_request.rb +3 -5
- data/lib/mundi_api/models/create_checkout_payment_request.rb +55 -11
- data/lib/mundi_api/models/create_credit_card_payment_request.rb +28 -12
- data/lib/mundi_api/models/create_customer_request.rb +10 -12
- data/lib/mundi_api/models/create_device_request.rb +33 -0
- data/lib/mundi_api/models/create_discount_request.rb +5 -7
- data/lib/mundi_api/models/create_location_request.rb +42 -0
- data/lib/mundi_api/models/create_order_item_request.rb +15 -8
- data/lib/mundi_api/models/create_order_request.rb +57 -13
- data/lib/mundi_api/models/create_payment_request.rb +46 -13
- data/lib/mundi_api/models/create_phone_request.rb +4 -6
- data/lib/mundi_api/models/create_phones_request.rb +3 -5
- data/lib/mundi_api/models/create_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/create_plan_request.rb +19 -21
- data/lib/mundi_api/models/create_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/create_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/create_recipient_request.rb +88 -0
- data/lib/mundi_api/models/create_seller_request.rb +21 -23
- data/lib/mundi_api/models/create_setup_request.rb +4 -6
- data/lib/mundi_api/models/create_shipping_request.rb +7 -9
- data/lib/mundi_api/models/create_split_request.rb +51 -0
- data/lib/mundi_api/models/create_subscription_item_request.rb +18 -11
- data/lib/mundi_api/models/create_subscription_request.rb +46 -30
- data/lib/mundi_api/models/create_token_request.rb +3 -5
- data/lib/mundi_api/models/create_transfer_request.rb +42 -0
- data/lib/mundi_api/models/create_usage_request.rb +4 -6
- data/lib/mundi_api/models/create_voucher_payment_request.rb +6 -8
- data/lib/mundi_api/models/get_access_token_response.rb +6 -8
- data/lib/mundi_api/models/get_address_response.rb +35 -19
- data/lib/mundi_api/models/get_anticipation_limit_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_limits_response.rb +42 -0
- data/lib/mundi_api/models/get_anticipation_response.rb +117 -0
- data/lib/mundi_api/models/get_balance_response.rb +52 -0
- data/lib/mundi_api/models/get_bank_account_response.rb +161 -0
- data/lib/mundi_api/models/get_bank_transfer_transaction_response.rb +22 -9
- data/lib/mundi_api/models/get_billing_address_response.rb +29 -13
- data/lib/mundi_api/models/get_boleto_transaction_response.rb +96 -11
- data/lib/mundi_api/models/get_card_response.rb +16 -18
- data/lib/mundi_api/models/get_card_token_response.rb +8 -10
- data/lib/mundi_api/models/get_charge_response.rb +18 -20
- data/lib/mundi_api/models/get_checkout_boleto_payment_response.rb +43 -0
- data/lib/mundi_api/models/get_checkout_card_installment_options_response.rb +42 -0
- data/lib/mundi_api/models/get_checkout_card_payment_response.rb +49 -0
- data/lib/mundi_api/models/get_checkout_payment_response.rb +238 -0
- data/lib/mundi_api/models/get_checkout_payment_settings_response.rb +9 -11
- data/lib/mundi_api/models/get_credit_card_transaction_response.rb +36 -14
- data/lib/mundi_api/models/get_customer_response.rb +24 -17
- data/lib/mundi_api/models/get_device_response.rb +33 -0
- data/lib/mundi_api/models/get_discount_response.rb +9 -11
- data/lib/mundi_api/models/get_gateway_recipient_response.rb +69 -0
- data/lib/mundi_api/models/get_invoice_item_response.rb +27 -11
- data/lib/mundi_api/models/get_invoice_response.rb +29 -22
- data/lib/mundi_api/models/get_location_response.rb +42 -0
- data/lib/mundi_api/models/get_order_item_response.rb +28 -12
- data/lib/mundi_api/models/get_order_response.rb +64 -20
- data/lib/mundi_api/models/get_period_response.rb +6 -8
- data/lib/mundi_api/models/get_phone_response.rb +4 -6
- data/lib/mundi_api/models/get_phones_response.rb +3 -5
- data/lib/mundi_api/models/get_plan_item_response.rb +12 -14
- data/lib/mundi_api/models/get_plan_response.rb +22 -24
- data/lib/mundi_api/models/get_price_bracket_response.rb +5 -7
- data/lib/mundi_api/models/get_pricing_scheme_response.rb +5 -7
- data/lib/mundi_api/models/get_recipient_response.rb +150 -0
- data/lib/mundi_api/models/get_safety_pay_transaction_response.rb +21 -8
- data/lib/mundi_api/models/get_seller_response.rb +13 -15
- data/lib/mundi_api/models/get_sellers_request.rb +87 -0
- data/lib/mundi_api/models/get_setup_response.rb +5 -7
- data/lib/mundi_api/models/get_shipping_response.rb +6 -8
- data/lib/mundi_api/models/get_split_response.rb +52 -0
- data/lib/mundi_api/models/get_subscription_item_response.rb +24 -17
- data/lib/mundi_api/models/get_subscription_response.rb +44 -37
- data/lib/mundi_api/models/get_token_response.rb +6 -8
- data/lib/mundi_api/models/get_transaction_response.rb +37 -14
- data/lib/mundi_api/models/get_transfer_response.rb +89 -0
- data/lib/mundi_api/models/get_usage_response.rb +27 -11
- data/lib/mundi_api/models/get_voucher_transaction_response.rb +27 -14
- data/lib/mundi_api/models/list_access_tokens_response.rb +3 -5
- data/lib/mundi_api/models/list_addresses_response.rb +3 -5
- data/lib/mundi_api/models/list_anticipation_response.rb +49 -0
- data/lib/mundi_api/models/list_cards_response.rb +3 -5
- data/lib/mundi_api/models/list_charges_response.rb +3 -5
- data/lib/mundi_api/models/list_customers_response.rb +3 -5
- data/lib/mundi_api/models/list_invoices_response.rb +3 -5
- data/lib/mundi_api/models/list_order_response.rb +3 -5
- data/lib/mundi_api/models/list_plans_response.rb +3 -5
- data/lib/mundi_api/models/list_recipient_response.rb +49 -0
- data/lib/mundi_api/models/list_seller_response.rb +49 -0
- data/lib/mundi_api/models/list_subscription_items_response.rb +3 -5
- data/lib/mundi_api/models/list_subscriptions_response.rb +3 -5
- data/lib/mundi_api/models/list_transactions_response.rb +3 -5
- data/lib/mundi_api/models/list_transfer_response.rb +49 -0
- data/lib/mundi_api/models/list_usages_response.rb +3 -5
- data/lib/mundi_api/models/paging_response.rb +4 -6
- data/lib/mundi_api/models/update_address_request.rb +15 -8
- data/lib/mundi_api/models/update_card_request.rb +7 -9
- data/lib/mundi_api/models/update_charge_card_request.rb +5 -7
- data/lib/mundi_api/models/update_charge_due_date_request.rb +2 -4
- data/lib/mundi_api/models/update_charge_payment_method_request.rb +6 -8
- data/lib/mundi_api/models/update_customer_request.rb +23 -16
- data/lib/mundi_api/models/update_invoice_status_request.rb +33 -0
- data/lib/mundi_api/models/update_metadata_request.rb +2 -4
- data/lib/mundi_api/models/update_order_item_request.rb +60 -0
- data/lib/mundi_api/models/update_order_status_request.rb +33 -0
- data/lib/mundi_api/models/update_plan_item_request.rb +7 -9
- data/lib/mundi_api/models/update_plan_request.rb +16 -18
- data/lib/mundi_api/models/update_price_bracket_request.rb +5 -7
- data/lib/mundi_api/models/update_pricing_scheme_request.rb +5 -7
- data/lib/mundi_api/models/update_recipient_bank_account_request.rb +34 -0
- data/lib/mundi_api/models/update_recipient_request.rb +78 -0
- data/lib/mundi_api/models/update_seller_request.rb +97 -0
- data/lib/mundi_api/models/update_subscription_affiliation_id_request.rb +33 -0
- data/lib/mundi_api/models/update_subscription_billing_date_request.rb +2 -4
- data/lib/mundi_api/models/update_subscription_card_request.rb +3 -5
- data/lib/mundi_api/models/update_subscription_item_request.rb +16 -9
- data/lib/mundi_api/models/update_subscription_payment_method_request.rb +4 -6
- data/lib/mundi_api/mundi_api_client.rb +32 -20
- metadata +39 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51d3c67f91e0fea4ded57a42ea9ce71005cb6f76
|
4
|
+
data.tar.gz: 194741f5d907e56e2739a6c7e47d0c54e5e50db2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a5065c2b35b1abf4d80741cbe06571788dc5bff9530c23ee1a0e996a2083ff8a814b46ad6801fa6e6a0c088d442c53bf2ab0f32b5e26ef56ca36b18c717d369
|
7
|
+
data.tar.gz: dd3d1fc6cf2703f70f2b6819d653845c4e0e1c887cc98674cae7e7ade6f565fe5c0e10b53aefd0f9467eac32e78cc8759b978fc0eba8c686262d000665bd64a4
|
data/README.md
CHANGED
@@ -8,9 +8,9 @@ This client library is a Ruby gem which can be compiled and used in your Ruby an
|
|
8
8
|
|
9
9
|
1. Open the command line interface or the terminal and navigate to the folder containing the source code.
|
10
10
|
2. Run ``` gem build mundi_api.gemspec ``` to build the gem.
|
11
|
-
3. Once built, the gem can be installed on the current work environment using ``` gem install mundi_api-0.
|
11
|
+
3. Once built, the gem can be installed on the current work environment using ``` gem install mundi_api-0.13.7.gem ```
|
12
12
|
|
13
|
-

|
14
14
|
|
15
15
|
## How to Use
|
16
16
|
|
@@ -20,41 +20,41 @@ The following section explains how to use the MundiApi Ruby Gem in a new Rails p
|
|
20
20
|
|
21
21
|
Close any existing projects in RubyMine™ by selecting ``` File -> Close Project ```. Next, click on ``` Create New Project ``` to create a new project from scratch.
|
22
22
|
|
23
|
-

|
24
24
|
|
25
25
|
Next, provide ``` TestApp ``` as the project name, choose ``` Rails Application ``` as the project type, and click ``` OK ```.
|
26
26
|
|
27
|
-

|
28
28
|
|
29
29
|
In the next dialog make sure that correct *Ruby SDK* is being used (minimum 2.0.0) and click ``` OK ```.
|
30
30
|
|
31
|
-

|
32
32
|
|
33
33
|
This will create a new Rails Application project with an existing set of files and folder.
|
34
34
|
|
35
35
|
### 2. Add reference of the gem
|
36
36
|
|
37
|
-
In order to use the MundiApi gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'mundi_api', '~> 0.
|
37
|
+
In order to use the MundiApi gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'mundi_api', '~> 0.13.7' ```
|
38
38
|
|
39
|
-

|
40
40
|
|
41
41
|
### 3. Adding a new Rails Controller
|
42
42
|
|
43
43
|
Once the ``` TestApp ``` project is created, a folder named ``` controllers ``` will be visible in the *Project Explorer* under the following path: ``` TestApp > app > controllers ```. Right click on this folder and select ``` New -> Run Rails Generator... ```.
|
44
44
|
|
45
|
-

|
46
46
|
|
47
47
|
Selecting the said option will popup a small window where the generator names are displayed. Here, select the ``` controller ``` template.
|
48
48
|
|
49
|
-

|
50
50
|
|
51
51
|
Next, a popup window will ask you for a Controller name and included Actions. For controller name provide ``` Hello ``` and include an action named ``` Index ``` and click ``` OK ```.
|
52
52
|
|
53
|
-

|
54
54
|
|
55
55
|
A new controller class anmed ``` HelloController ``` will be created in a file named ``` hello_controller.rb ``` containing a method named ``` Index ```. In this method, add code for initialization and a sample for its usage.
|
56
56
|
|
57
|
-

|
58
58
|
|
59
59
|
## How to Test
|
60
60
|
|
@@ -91,7 +91,7 @@ client = MundiApi::MundiApiClient.new(
|
|
91
91
|
|
92
92
|
The added initlization code can be debugged by putting a breakpoint in the ``` Index ``` method and running the project in debug mode by selecting ``` Run -> Debug 'Development: TestApp' ```.
|
93
93
|
|
94
|
-

|
95
95
|
|
96
96
|
|
97
97
|
|
@@ -99,462 +99,1524 @@ The added initlization code can be debugged by putting a breakpoint in the ``` I
|
|
99
99
|
|
100
100
|
## <a name="list_of_controllers"></a>List of Controllers
|
101
101
|
|
102
|
-
* [ChargesController](#charges_controller)
|
103
|
-
* [CustomersController](#customers_controller)
|
104
|
-
* [InvoicesController](#invoices_controller)
|
105
|
-
* [PlansController](#plans_controller)
|
106
102
|
* [SubscriptionsController](#subscriptions_controller)
|
107
103
|
* [OrdersController](#orders_controller)
|
104
|
+
* [PlansController](#plans_controller)
|
105
|
+
* [InvoicesController](#invoices_controller)
|
106
|
+
* [CustomersController](#customers_controller)
|
107
|
+
* [ChargesController](#charges_controller)
|
108
|
+
* [RecipientsController](#recipients_controller)
|
108
109
|
* [TokensController](#tokens_controller)
|
110
|
+
* [SellersController](#sellers_controller)
|
109
111
|
|
110
|
-
## <a name="
|
112
|
+
## <a name="subscriptions_controller"></a> SubscriptionsController
|
111
113
|
|
112
114
|
### Get singleton instance
|
113
115
|
|
114
|
-
The singleton instance of the ```
|
116
|
+
The singleton instance of the ``` SubscriptionsController ``` class can be accessed from the API Client.
|
115
117
|
|
116
118
|
```ruby
|
117
|
-
|
119
|
+
subscriptions_controller = client.subscriptions
|
118
120
|
```
|
119
121
|
|
120
|
-
### <a name="
|
122
|
+
### <a name="update_subscription_billing_date"></a> update_subscription_billing_date
|
121
123
|
|
122
|
-
>
|
124
|
+
> Updates the billing date from a subscription
|
123
125
|
|
124
126
|
|
125
127
|
```ruby
|
126
|
-
def
|
128
|
+
def update_subscription_billing_date(subscription_id,
|
129
|
+
request); end
|
127
130
|
```
|
128
131
|
|
129
132
|
#### Parameters
|
130
133
|
|
131
134
|
| Parameter | Tags | Description |
|
132
135
|
|-----------|------|-------------|
|
133
|
-
|
|
136
|
+
| subscription_id | ``` Required ``` | The subscription id |
|
137
|
+
| request | ``` Required ``` | Request for updating the subscription billing date |
|
134
138
|
|
135
139
|
|
136
140
|
#### Example Usage
|
137
141
|
|
138
142
|
```ruby
|
139
|
-
|
143
|
+
subscription_id = 'subscription_id'
|
144
|
+
request = UpdateSubscriptionBillingDateRequest.new
|
140
145
|
|
141
|
-
result =
|
146
|
+
result = subscriptions_controller.update_subscription_billing_date(subscription_id, request)
|
142
147
|
|
143
148
|
```
|
144
149
|
|
145
150
|
|
146
|
-
### <a name="
|
151
|
+
### <a name="update_subscription_card"></a> update_subscription_card
|
147
152
|
|
148
|
-
>
|
153
|
+
> Updates the credit card from a subscription
|
149
154
|
|
150
155
|
|
151
156
|
```ruby
|
152
|
-
def
|
157
|
+
def update_subscription_card(subscription_id,
|
158
|
+
request); end
|
153
159
|
```
|
154
160
|
|
155
161
|
#### Parameters
|
156
162
|
|
157
163
|
| Parameter | Tags | Description |
|
158
164
|
|-----------|------|-------------|
|
159
|
-
|
|
165
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
166
|
+
| request | ``` Required ``` | Request for updating a card |
|
160
167
|
|
161
168
|
|
162
169
|
#### Example Usage
|
163
170
|
|
164
171
|
```ruby
|
165
|
-
|
172
|
+
subscription_id = 'subscription_id'
|
173
|
+
request = UpdateSubscriptionCardRequest.new
|
166
174
|
|
167
|
-
result =
|
175
|
+
result = subscriptions_controller.update_subscription_card(subscription_id, request)
|
168
176
|
|
169
177
|
```
|
170
178
|
|
171
179
|
|
172
|
-
### <a name="
|
180
|
+
### <a name="update_subscription_item"></a> update_subscription_item
|
173
181
|
|
174
|
-
>
|
182
|
+
> Updates a subscription item
|
175
183
|
|
176
184
|
|
177
185
|
```ruby
|
178
|
-
def
|
186
|
+
def update_subscription_item(subscription_id,
|
187
|
+
item_id,
|
188
|
+
body); end
|
179
189
|
```
|
180
190
|
|
181
191
|
#### Parameters
|
182
192
|
|
183
193
|
| Parameter | Tags | Description |
|
184
194
|
|-----------|------|-------------|
|
185
|
-
|
|
195
|
+
| subscription_id | ``` Required ``` | Subscription Id |
|
196
|
+
| item_id | ``` Required ``` | Item id |
|
197
|
+
| body | ``` Required ``` | Request for updating a subscription item |
|
186
198
|
|
187
199
|
|
188
200
|
#### Example Usage
|
189
201
|
|
190
202
|
```ruby
|
191
|
-
|
203
|
+
subscription_id = 'subscription_id'
|
204
|
+
item_id = 'item_id'
|
205
|
+
body = UpdateSubscriptionItemRequest.new
|
192
206
|
|
193
|
-
result =
|
207
|
+
result = subscriptions_controller.update_subscription_item(subscription_id, item_id, body)
|
194
208
|
|
195
209
|
```
|
196
210
|
|
197
211
|
|
198
|
-
### <a name="
|
212
|
+
### <a name="create_usage"></a> create_usage
|
199
213
|
|
200
|
-
>
|
214
|
+
> Creates a usage
|
201
215
|
|
202
216
|
|
203
217
|
```ruby
|
204
|
-
def
|
205
|
-
|
218
|
+
def create_usage(subscription_id,
|
219
|
+
item_id,
|
220
|
+
body); end
|
206
221
|
```
|
207
222
|
|
208
223
|
#### Parameters
|
209
224
|
|
210
225
|
| Parameter | Tags | Description |
|
211
226
|
|-----------|------|-------------|
|
212
|
-
|
|
213
|
-
|
|
227
|
+
| subscription_id | ``` Required ``` | Subscription Id |
|
228
|
+
| item_id | ``` Required ``` | Item id |
|
229
|
+
| body | ``` Required ``` | Request for creating a usage |
|
214
230
|
|
215
231
|
|
216
232
|
#### Example Usage
|
217
233
|
|
218
234
|
```ruby
|
219
|
-
|
220
|
-
|
235
|
+
subscription_id = 'subscription_id'
|
236
|
+
item_id = 'item_id'
|
237
|
+
body = CreateUsageRequest.new
|
221
238
|
|
222
|
-
result =
|
239
|
+
result = subscriptions_controller.create_usage(subscription_id, item_id, body)
|
223
240
|
|
224
241
|
```
|
225
242
|
|
226
243
|
|
227
|
-
### <a name="
|
244
|
+
### <a name="get_subscription"></a> get_subscription
|
228
245
|
|
229
|
-
>
|
246
|
+
> Gets a subscription
|
230
247
|
|
231
248
|
|
232
249
|
```ruby
|
233
|
-
def
|
234
|
-
request); end
|
250
|
+
def get_subscription(subscription_id); end
|
235
251
|
```
|
236
252
|
|
237
253
|
#### Parameters
|
238
254
|
|
239
255
|
| Parameter | Tags | Description |
|
240
256
|
|-----------|------|-------------|
|
241
|
-
|
|
242
|
-
| request | ``` Required ``` | Request for updating the payment method from a charge |
|
257
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
243
258
|
|
244
259
|
|
245
260
|
#### Example Usage
|
246
261
|
|
247
262
|
```ruby
|
248
|
-
|
249
|
-
request = UpdateChargePaymentMethodRequest.new
|
263
|
+
subscription_id = 'subscription_id'
|
250
264
|
|
251
|
-
result =
|
265
|
+
result = subscriptions_controller.get_subscription(subscription_id)
|
252
266
|
|
253
267
|
```
|
254
268
|
|
255
269
|
|
256
|
-
### <a name="
|
270
|
+
### <a name="update_subscription_payment_method"></a> update_subscription_payment_method
|
257
271
|
|
258
|
-
>
|
272
|
+
> Updates the payment method from a subscription
|
259
273
|
|
260
274
|
|
261
275
|
```ruby
|
262
|
-
def
|
263
|
-
|
276
|
+
def update_subscription_payment_method(subscription_id,
|
277
|
+
request); end
|
264
278
|
```
|
265
279
|
|
266
280
|
#### Parameters
|
267
281
|
|
268
282
|
| Parameter | Tags | Description |
|
269
283
|
|-----------|------|-------------|
|
270
|
-
|
|
271
|
-
| request | ```
|
284
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
285
|
+
| request | ``` Required ``` | Request for updating the paymentmethod from a subscription |
|
272
286
|
|
273
287
|
|
274
288
|
#### Example Usage
|
275
289
|
|
276
290
|
```ruby
|
277
|
-
|
278
|
-
request =
|
291
|
+
subscription_id = 'subscription_id'
|
292
|
+
request = UpdateSubscriptionPaymentMethodRequest.new
|
279
293
|
|
280
|
-
result =
|
294
|
+
result = subscriptions_controller.update_subscription_payment_method(subscription_id, request)
|
281
295
|
|
282
296
|
```
|
283
297
|
|
284
298
|
|
285
|
-
### <a name="
|
299
|
+
### <a name="create_subscription"></a> create_subscription
|
286
300
|
|
287
|
-
>
|
301
|
+
> Creates a new subscription
|
288
302
|
|
289
303
|
|
290
304
|
```ruby
|
291
|
-
def
|
292
|
-
request = nil); end
|
305
|
+
def create_subscription(body); end
|
293
306
|
```
|
294
307
|
|
295
308
|
#### Parameters
|
296
309
|
|
297
310
|
| Parameter | Tags | Description |
|
298
311
|
|-----------|------|-------------|
|
299
|
-
|
|
300
|
-
| request | ``` Optional ``` | Request for capturing a charge |
|
312
|
+
| body | ``` Required ``` | Request for creating a subscription |
|
301
313
|
|
302
314
|
|
303
315
|
#### Example Usage
|
304
316
|
|
305
317
|
```ruby
|
306
|
-
|
307
|
-
request = CreateCaptureChargeRequest.new
|
318
|
+
body = CreateSubscriptionRequest.new
|
308
319
|
|
309
|
-
result =
|
320
|
+
result = subscriptions_controller.create_subscription(body)
|
310
321
|
|
311
322
|
```
|
312
323
|
|
313
324
|
|
314
|
-
### <a name="
|
325
|
+
### <a name="create_subscription_item"></a> create_subscription_item
|
315
326
|
|
316
|
-
>
|
327
|
+
> Creates a new Subscription item
|
317
328
|
|
318
329
|
|
319
330
|
```ruby
|
320
|
-
def
|
321
|
-
|
331
|
+
def create_subscription_item(subscription_id,
|
332
|
+
request); end
|
322
333
|
```
|
323
334
|
|
324
335
|
#### Parameters
|
325
336
|
|
326
337
|
| Parameter | Tags | Description |
|
327
338
|
|-----------|------|-------------|
|
328
|
-
|
|
329
|
-
| request | ``` Required ``` | Request for
|
339
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
340
|
+
| request | ``` Required ``` | Request for creating a subscription item |
|
330
341
|
|
331
342
|
|
332
343
|
#### Example Usage
|
333
344
|
|
334
345
|
```ruby
|
335
|
-
|
336
|
-
request =
|
346
|
+
subscription_id = 'subscription_id'
|
347
|
+
request = CreateSubscriptionItemRequest.new
|
337
348
|
|
338
|
-
result =
|
349
|
+
result = subscriptions_controller.create_subscription_item(subscription_id, request)
|
339
350
|
|
340
351
|
```
|
341
352
|
|
342
353
|
|
343
|
-
### <a name="
|
354
|
+
### <a name="create_discount"></a> create_discount
|
344
355
|
|
345
|
-
>
|
356
|
+
> Creates a discount
|
346
357
|
|
347
358
|
|
348
359
|
```ruby
|
349
|
-
def
|
350
|
-
|
351
|
-
code = nil,
|
352
|
-
status = nil,
|
353
|
-
payment_method = nil,
|
354
|
-
customer_id = nil,
|
355
|
-
order_id = nil,
|
356
|
-
created_since = nil,
|
357
|
-
created_until = nil); end
|
360
|
+
def create_discount(subscription_id,
|
361
|
+
request); end
|
358
362
|
```
|
359
363
|
|
360
364
|
#### Parameters
|
361
365
|
|
362
366
|
| Parameter | Tags | Description |
|
363
367
|
|-----------|------|-------------|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
| code | ``` Optional ``` | Filter for charge's code |
|
367
|
-
| status | ``` Optional ``` | Filter for charge's status |
|
368
|
-
| payment_method | ``` Optional ``` | Filter for charge's payment method |
|
369
|
-
| customer_id | ``` Optional ``` | Filter for charge's customer id |
|
370
|
-
| order_id | ``` Optional ``` | Filter for charge's order id |
|
371
|
-
| created_since | ``` Optional ``` | Filter for the beginning of the range for charge's creation |
|
372
|
-
| created_until | ``` Optional ``` | Filter for the end of the range for charge's creation |
|
368
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
369
|
+
| request | ``` Required ``` | Request for creating a discount |
|
373
370
|
|
374
371
|
|
375
372
|
#### Example Usage
|
376
373
|
|
377
374
|
```ruby
|
378
|
-
|
379
|
-
|
380
|
-
code = 'code'
|
381
|
-
status = 'status'
|
382
|
-
payment_method = 'payment_method'
|
383
|
-
customer_id = 'customer_id'
|
384
|
-
order_id = 'order_id'
|
385
|
-
created_since = DateTime.now
|
386
|
-
created_until = DateTime.now
|
375
|
+
subscription_id = 'subscription_id'
|
376
|
+
request = CreateDiscountRequest.new
|
387
377
|
|
388
|
-
result =
|
378
|
+
result = subscriptions_controller.create_discount(subscription_id, request)
|
389
379
|
|
390
380
|
```
|
391
381
|
|
392
382
|
|
393
|
-
|
394
|
-
|
395
|
-
## <a name="customers_controller"></a> CustomersController
|
396
|
-
|
397
|
-
### Get singleton instance
|
398
|
-
|
399
|
-
The singleton instance of the ``` CustomersController ``` class can be accessed from the API Client.
|
400
|
-
|
401
|
-
```ruby
|
402
|
-
customers = client.customers
|
403
|
-
```
|
404
|
-
|
405
|
-
### <a name="create_customer"></a> create_customer
|
383
|
+
### <a name="get_subscription_item"></a> get_subscription_item
|
406
384
|
|
407
|
-
>
|
385
|
+
> Get Subscription Item
|
408
386
|
|
409
387
|
|
410
388
|
```ruby
|
411
|
-
def
|
389
|
+
def get_subscription_item(subscription_id,
|
390
|
+
item_id); end
|
412
391
|
```
|
413
392
|
|
414
393
|
#### Parameters
|
415
394
|
|
416
395
|
| Parameter | Tags | Description |
|
417
396
|
|-----------|------|-------------|
|
418
|
-
|
|
397
|
+
| subscription_id | ``` Required ``` | Subscription Id |
|
398
|
+
| item_id | ``` Required ``` | Item id |
|
419
399
|
|
420
400
|
|
421
401
|
#### Example Usage
|
422
402
|
|
423
403
|
```ruby
|
424
|
-
|
404
|
+
subscription_id = 'subscription_id'
|
405
|
+
item_id = 'item_id'
|
425
406
|
|
426
|
-
result =
|
407
|
+
result = subscriptions_controller.get_subscription_item(subscription_id, item_id)
|
427
408
|
|
428
409
|
```
|
429
410
|
|
430
411
|
|
431
|
-
### <a name="
|
412
|
+
### <a name="get_subscription_items"></a> get_subscription_items
|
432
413
|
|
433
|
-
> Get
|
414
|
+
> Get Subscription Itens
|
434
415
|
|
435
416
|
|
436
417
|
```ruby
|
437
|
-
def
|
418
|
+
def get_subscription_items(subscription_id,
|
419
|
+
status,
|
420
|
+
description); end
|
438
421
|
```
|
439
422
|
|
440
423
|
#### Parameters
|
441
424
|
|
442
425
|
| Parameter | Tags | Description |
|
443
426
|
|-----------|------|-------------|
|
444
|
-
|
|
427
|
+
| subscription_id | ``` Required ``` | Subscription Id |
|
428
|
+
| status | ``` Required ``` | Status |
|
429
|
+
| description | ``` Required ``` | Description |
|
445
430
|
|
446
431
|
|
447
432
|
#### Example Usage
|
448
433
|
|
449
434
|
```ruby
|
450
|
-
|
435
|
+
subscription_id = 'subscription_id'
|
436
|
+
status = 'status'
|
437
|
+
description = 'description'
|
451
438
|
|
452
|
-
result =
|
439
|
+
result = subscriptions_controller.get_subscription_items(subscription_id, status, description)
|
453
440
|
|
454
441
|
```
|
455
442
|
|
456
443
|
|
457
|
-
### <a name="
|
444
|
+
### <a name="update_subscription_affiliation_id"></a> update_subscription_affiliation_id
|
458
445
|
|
459
|
-
>
|
446
|
+
> TODO: Add a method description
|
460
447
|
|
461
448
|
|
462
449
|
```ruby
|
463
|
-
def
|
464
|
-
|
465
|
-
request); end
|
450
|
+
def update_subscription_affiliation_id(subscription_id,
|
451
|
+
request); end
|
466
452
|
```
|
467
453
|
|
468
454
|
#### Parameters
|
469
455
|
|
470
456
|
| Parameter | Tags | Description |
|
471
457
|
|-----------|------|-------------|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
| request | ``` Required ``` | Request for updating a card |
|
458
|
+
| subscription_id | ``` Required ``` | TODO: Add a parameter description |
|
459
|
+
| request | ``` Required ``` | Request for updating a subscription affiliation id |
|
475
460
|
|
476
461
|
|
477
462
|
#### Example Usage
|
478
463
|
|
479
464
|
```ruby
|
480
|
-
|
481
|
-
|
482
|
-
request = UpdateCardRequest.new
|
465
|
+
subscription_id = 'subscription_id'
|
466
|
+
request = UpdateSubscriptionAffiliationIdRequest.new
|
483
467
|
|
484
|
-
result =
|
468
|
+
result = subscriptions_controller.update_subscription_affiliation_id(subscription_id, request)
|
485
469
|
|
486
470
|
```
|
487
471
|
|
488
472
|
|
489
|
-
### <a name="
|
473
|
+
### <a name="create_an_usage"></a> create_an_usage
|
490
474
|
|
491
|
-
>
|
475
|
+
> Create Usage
|
492
476
|
|
493
477
|
|
494
478
|
```ruby
|
495
|
-
def
|
496
|
-
|
497
|
-
request); end
|
479
|
+
def create_an_usage(subscription_id,
|
480
|
+
item_id); end
|
498
481
|
```
|
499
482
|
|
500
483
|
#### Parameters
|
501
484
|
|
502
485
|
| Parameter | Tags | Description |
|
503
486
|
|-----------|------|-------------|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
| request | ``` Required ``` | Request for updating an address |
|
487
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
488
|
+
| item_id | ``` Required ``` | Item id |
|
507
489
|
|
508
490
|
|
509
491
|
#### Example Usage
|
510
492
|
|
511
493
|
```ruby
|
512
|
-
|
513
|
-
|
514
|
-
request = UpdateAddressRequest.new
|
494
|
+
subscription_id = 'subscription_id'
|
495
|
+
item_id = 'item_id'
|
515
496
|
|
516
|
-
result =
|
497
|
+
result = subscriptions_controller.create_an_usage(subscription_id, item_id)
|
517
498
|
|
518
499
|
```
|
519
500
|
|
520
501
|
|
521
|
-
### <a name="
|
502
|
+
### <a name="get_subscriptions"></a> get_subscriptions
|
522
503
|
|
523
|
-
>
|
504
|
+
> Gets all subscriptions
|
524
505
|
|
525
506
|
|
526
507
|
```ruby
|
527
|
-
def
|
528
|
-
|
508
|
+
def get_subscriptions(page = nil,
|
509
|
+
size = nil,
|
510
|
+
code = nil,
|
511
|
+
billing_type = nil,
|
512
|
+
customer_id = nil,
|
513
|
+
plan_id = nil,
|
514
|
+
card_id = nil,
|
515
|
+
status = nil,
|
516
|
+
next_billing_since = nil,
|
517
|
+
next_billing_until = nil,
|
518
|
+
created_since = nil,
|
519
|
+
created_until = nil); end
|
529
520
|
```
|
530
521
|
|
531
522
|
#### Parameters
|
532
523
|
|
533
524
|
| Parameter | Tags | Description |
|
534
525
|
|-----------|------|-------------|
|
535
|
-
|
|
536
|
-
|
|
526
|
+
| page | ``` Optional ``` | Page number |
|
527
|
+
| size | ``` Optional ``` | Page size |
|
528
|
+
| code | ``` Optional ``` | Filter for subscription's code |
|
529
|
+
| billing_type | ``` Optional ``` | Filter for subscription's billing type |
|
530
|
+
| customer_id | ``` Optional ``` | Filter for subscription's customer id |
|
531
|
+
| plan_id | ``` Optional ``` | Filter for subscription's plan id |
|
532
|
+
| card_id | ``` Optional ``` | Filter for subscription's card id |
|
533
|
+
| status | ``` Optional ``` | Filter for subscription's status |
|
534
|
+
| next_billing_since | ``` Optional ``` | Filter for subscription's next billing date start range |
|
535
|
+
| next_billing_until | ``` Optional ``` | Filter for subscription's next billing date end range |
|
536
|
+
| created_since | ``` Optional ``` | Filter for subscription's creation date start range |
|
537
|
+
| created_until | ``` Optional ``` | Filter for subscriptions creation date end range |
|
538
|
+
|
539
|
+
|
540
|
+
#### Example Usage
|
541
|
+
|
542
|
+
```ruby
|
543
|
+
page = 43
|
544
|
+
size = 43
|
545
|
+
code = 'code'
|
546
|
+
billing_type = 'billing_type'
|
547
|
+
customer_id = 'customer_id'
|
548
|
+
plan_id = 'plan_id'
|
549
|
+
card_id = 'card_id'
|
550
|
+
status = 'status'
|
551
|
+
next_billing_since = DateTime.now
|
552
|
+
next_billing_until = DateTime.now
|
553
|
+
created_since = DateTime.now
|
554
|
+
created_until = DateTime.now
|
555
|
+
|
556
|
+
result = subscriptions_controller.get_subscriptions(page, size, code, billing_type, customer_id, plan_id, card_id, status, next_billing_since, next_billing_until, created_since, created_until)
|
557
|
+
|
558
|
+
```
|
559
|
+
|
560
|
+
|
561
|
+
### <a name="update_subscription_metadata"></a> update_subscription_metadata
|
562
|
+
|
563
|
+
> Updates the metadata from a subscription
|
564
|
+
|
565
|
+
|
566
|
+
```ruby
|
567
|
+
def update_subscription_metadata(subscription_id,
|
568
|
+
request); end
|
569
|
+
```
|
570
|
+
|
571
|
+
#### Parameters
|
572
|
+
|
573
|
+
| Parameter | Tags | Description |
|
574
|
+
|-----------|------|-------------|
|
575
|
+
| subscription_id | ``` Required ``` | The subscription id |
|
576
|
+
| request | ``` Required ``` | Request for updating the subscrption metadata |
|
577
|
+
|
578
|
+
|
579
|
+
#### Example Usage
|
580
|
+
|
581
|
+
```ruby
|
582
|
+
subscription_id = 'subscription_id'
|
583
|
+
request = UpdateMetadataRequest.new
|
584
|
+
|
585
|
+
result = subscriptions_controller.update_subscription_metadata(subscription_id, request)
|
586
|
+
|
587
|
+
```
|
588
|
+
|
589
|
+
|
590
|
+
### <a name="delete_subscription_item"></a> delete_subscription_item
|
591
|
+
|
592
|
+
> Deletes a subscription item
|
593
|
+
|
594
|
+
|
595
|
+
```ruby
|
596
|
+
def delete_subscription_item(subscription_id,
|
597
|
+
subscription_item_id); end
|
598
|
+
```
|
599
|
+
|
600
|
+
#### Parameters
|
601
|
+
|
602
|
+
| Parameter | Tags | Description |
|
603
|
+
|-----------|------|-------------|
|
604
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
605
|
+
| subscription_item_id | ``` Required ``` | Subscription item id |
|
606
|
+
|
607
|
+
|
608
|
+
#### Example Usage
|
609
|
+
|
610
|
+
```ruby
|
611
|
+
subscription_id = 'subscription_id'
|
612
|
+
subscription_item_id = 'subscription_item_id'
|
613
|
+
|
614
|
+
result = subscriptions_controller.delete_subscription_item(subscription_id, subscription_item_id)
|
615
|
+
|
616
|
+
```
|
617
|
+
|
618
|
+
|
619
|
+
### <a name="delete_usage"></a> delete_usage
|
620
|
+
|
621
|
+
> Deletes a usage
|
622
|
+
|
623
|
+
|
624
|
+
```ruby
|
625
|
+
def delete_usage(subscription_id,
|
626
|
+
item_id,
|
627
|
+
usage_id); end
|
628
|
+
```
|
629
|
+
|
630
|
+
#### Parameters
|
631
|
+
|
632
|
+
| Parameter | Tags | Description |
|
633
|
+
|-----------|------|-------------|
|
634
|
+
| subscription_id | ``` Required ``` | The subscription id |
|
635
|
+
| item_id | ``` Required ``` | The subscription item id |
|
636
|
+
| usage_id | ``` Required ``` | The usage id |
|
637
|
+
|
638
|
+
|
639
|
+
#### Example Usage
|
640
|
+
|
641
|
+
```ruby
|
642
|
+
subscription_id = 'subscription_id'
|
643
|
+
item_id = 'item_id'
|
644
|
+
usage_id = 'usage_id'
|
645
|
+
|
646
|
+
result = subscriptions_controller.delete_usage(subscription_id, item_id, usage_id)
|
647
|
+
|
648
|
+
```
|
649
|
+
|
650
|
+
|
651
|
+
### <a name="get_usages"></a> get_usages
|
652
|
+
|
653
|
+
> Lists all usages from a subscription item
|
654
|
+
|
655
|
+
|
656
|
+
```ruby
|
657
|
+
def get_usages(subscription_id,
|
658
|
+
item_id,
|
659
|
+
page = nil,
|
660
|
+
size = nil); end
|
661
|
+
```
|
662
|
+
|
663
|
+
#### Parameters
|
664
|
+
|
665
|
+
| Parameter | Tags | Description |
|
666
|
+
|-----------|------|-------------|
|
667
|
+
| subscription_id | ``` Required ``` | The subscription id |
|
668
|
+
| item_id | ``` Required ``` | The subscription item id |
|
669
|
+
| page | ``` Optional ``` | Page number |
|
670
|
+
| size | ``` Optional ``` | Page size |
|
671
|
+
|
672
|
+
|
673
|
+
#### Example Usage
|
674
|
+
|
675
|
+
```ruby
|
676
|
+
subscription_id = 'subscription_id'
|
677
|
+
item_id = 'item_id'
|
678
|
+
page = 43
|
679
|
+
size = 43
|
680
|
+
|
681
|
+
result = subscriptions_controller.get_usages(subscription_id, item_id, page, size)
|
682
|
+
|
683
|
+
```
|
684
|
+
|
685
|
+
|
686
|
+
### <a name="delete_discount"></a> delete_discount
|
687
|
+
|
688
|
+
> Deletes a discount
|
689
|
+
|
690
|
+
|
691
|
+
```ruby
|
692
|
+
def delete_discount(subscription_id,
|
693
|
+
discount_id); end
|
694
|
+
```
|
695
|
+
|
696
|
+
#### Parameters
|
697
|
+
|
698
|
+
| Parameter | Tags | Description |
|
699
|
+
|-----------|------|-------------|
|
700
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
701
|
+
| discount_id | ``` Required ``` | Discount Id |
|
702
|
+
|
703
|
+
|
704
|
+
#### Example Usage
|
705
|
+
|
706
|
+
```ruby
|
707
|
+
subscription_id = 'subscription_id'
|
708
|
+
discount_id = 'discount_id'
|
709
|
+
|
710
|
+
result = subscriptions_controller.delete_discount(subscription_id, discount_id)
|
711
|
+
|
712
|
+
```
|
713
|
+
|
714
|
+
|
715
|
+
### <a name="cancel_subscription"></a> cancel_subscription
|
716
|
+
|
717
|
+
> Cancels a subscription
|
718
|
+
|
719
|
+
|
720
|
+
```ruby
|
721
|
+
def cancel_subscription(subscription_id,
|
722
|
+
request = nil); end
|
723
|
+
```
|
724
|
+
|
725
|
+
#### Parameters
|
726
|
+
|
727
|
+
| Parameter | Tags | Description |
|
728
|
+
|-----------|------|-------------|
|
729
|
+
| subscription_id | ``` Required ``` | Subscription id |
|
730
|
+
| request | ``` Optional ``` | Request for cancelling a subscription |
|
731
|
+
|
732
|
+
|
733
|
+
#### Example Usage
|
734
|
+
|
735
|
+
```ruby
|
736
|
+
subscription_id = 'subscription_id'
|
737
|
+
request = CreateCancelSubscriptionRequest.new
|
738
|
+
|
739
|
+
result = subscriptions_controller.cancel_subscription(subscription_id, request)
|
740
|
+
|
741
|
+
```
|
742
|
+
|
743
|
+
|
744
|
+
### <a name="get_discount_by_id"></a> get_discount_by_id
|
745
|
+
|
746
|
+
> TODO: Add a method description
|
747
|
+
|
748
|
+
|
749
|
+
```ruby
|
750
|
+
def get_discount_by_id(subscription_id,
|
751
|
+
discount_id); end
|
752
|
+
```
|
753
|
+
|
754
|
+
#### Parameters
|
755
|
+
|
756
|
+
| Parameter | Tags | Description |
|
757
|
+
|-----------|------|-------------|
|
758
|
+
| subscription_id | ``` Required ``` | TODO: Add a parameter description |
|
759
|
+
| discount_id | ``` Required ``` | TODO: Add a parameter description |
|
760
|
+
|
761
|
+
|
762
|
+
#### Example Usage
|
763
|
+
|
764
|
+
```ruby
|
765
|
+
subscription_id = 'subscription_id'
|
766
|
+
discount_id = 'discountId'
|
767
|
+
|
768
|
+
result = subscriptions_controller.get_discount_by_id(subscription_id, discount_id)
|
769
|
+
|
770
|
+
```
|
771
|
+
|
772
|
+
|
773
|
+
[Back to List of Controllers](#list_of_controllers)
|
774
|
+
|
775
|
+
## <a name="orders_controller"></a> OrdersController
|
776
|
+
|
777
|
+
### Get singleton instance
|
778
|
+
|
779
|
+
The singleton instance of the ``` OrdersController ``` class can be accessed from the API Client.
|
780
|
+
|
781
|
+
```ruby
|
782
|
+
orders_controller = client.orders
|
783
|
+
```
|
784
|
+
|
785
|
+
### <a name="get_order"></a> get_order
|
786
|
+
|
787
|
+
> Gets an order
|
788
|
+
|
789
|
+
|
790
|
+
```ruby
|
791
|
+
def get_order(order_id); end
|
792
|
+
```
|
793
|
+
|
794
|
+
#### Parameters
|
795
|
+
|
796
|
+
| Parameter | Tags | Description |
|
797
|
+
|-----------|------|-------------|
|
798
|
+
| order_id | ``` Required ``` | Order id |
|
799
|
+
|
800
|
+
|
801
|
+
#### Example Usage
|
802
|
+
|
803
|
+
```ruby
|
804
|
+
order_id = 'order_id'
|
805
|
+
|
806
|
+
result = orders_controller.get_order(order_id)
|
807
|
+
|
808
|
+
```
|
809
|
+
|
810
|
+
|
811
|
+
### <a name="create_order"></a> create_order
|
812
|
+
|
813
|
+
> Creates a new Order
|
814
|
+
|
815
|
+
|
816
|
+
```ruby
|
817
|
+
def create_order(body); end
|
818
|
+
```
|
819
|
+
|
820
|
+
#### Parameters
|
821
|
+
|
822
|
+
| Parameter | Tags | Description |
|
823
|
+
|-----------|------|-------------|
|
824
|
+
| body | ``` Required ``` | Request for creating an order |
|
825
|
+
|
826
|
+
|
827
|
+
#### Example Usage
|
828
|
+
|
829
|
+
```ruby
|
830
|
+
body = CreateOrderRequest.new
|
831
|
+
|
832
|
+
result = orders_controller.create_order(body)
|
833
|
+
|
834
|
+
```
|
835
|
+
|
836
|
+
|
837
|
+
### <a name="get_orders"></a> get_orders
|
838
|
+
|
839
|
+
> Gets all orders
|
840
|
+
|
841
|
+
|
842
|
+
```ruby
|
843
|
+
def get_orders(page = nil,
|
844
|
+
size = nil,
|
845
|
+
code = nil,
|
846
|
+
status = nil,
|
847
|
+
created_since = nil,
|
848
|
+
created_until = nil,
|
849
|
+
customer_id = nil); end
|
850
|
+
```
|
851
|
+
|
852
|
+
#### Parameters
|
853
|
+
|
854
|
+
| Parameter | Tags | Description |
|
855
|
+
|-----------|------|-------------|
|
856
|
+
| page | ``` Optional ``` | Page number |
|
857
|
+
| size | ``` Optional ``` | Page size |
|
858
|
+
| code | ``` Optional ``` | Filter for order's code |
|
859
|
+
| status | ``` Optional ``` | Filter for order's status |
|
860
|
+
| created_since | ``` Optional ``` | Filter for order's creation date start range |
|
861
|
+
| created_until | ``` Optional ``` | Filter for order's creation date end range |
|
862
|
+
| customer_id | ``` Optional ``` | Filter for order's customer id |
|
863
|
+
|
864
|
+
|
865
|
+
#### Example Usage
|
866
|
+
|
867
|
+
```ruby
|
868
|
+
page = 43
|
869
|
+
size = 43
|
870
|
+
code = 'code'
|
871
|
+
status = 'status'
|
872
|
+
created_since = DateTime.now
|
873
|
+
created_until = DateTime.now
|
874
|
+
customer_id = 'customer_id'
|
875
|
+
|
876
|
+
result = orders_controller.get_orders(page, size, code, status, created_since, created_until, customer_id)
|
877
|
+
|
878
|
+
```
|
879
|
+
|
880
|
+
|
881
|
+
### <a name="update_order_metadata"></a> update_order_metadata
|
882
|
+
|
883
|
+
> Updates the metadata from an order
|
884
|
+
|
885
|
+
|
886
|
+
```ruby
|
887
|
+
def update_order_metadata(order_id,
|
888
|
+
request); end
|
889
|
+
```
|
890
|
+
|
891
|
+
#### Parameters
|
892
|
+
|
893
|
+
| Parameter | Tags | Description |
|
894
|
+
|-----------|------|-------------|
|
895
|
+
| order_id | ``` Required ``` | The order id |
|
896
|
+
| request | ``` Required ``` | Request for updating the order metadata |
|
897
|
+
|
898
|
+
|
899
|
+
#### Example Usage
|
900
|
+
|
901
|
+
```ruby
|
902
|
+
order_id = 'order_id'
|
903
|
+
request = UpdateMetadataRequest.new
|
904
|
+
|
905
|
+
result = orders_controller.update_order_metadata(order_id, request)
|
906
|
+
|
907
|
+
```
|
908
|
+
|
909
|
+
|
910
|
+
### <a name="delete_all_order_items"></a> delete_all_order_items
|
911
|
+
|
912
|
+
> TODO: Add a method description
|
913
|
+
|
914
|
+
|
915
|
+
```ruby
|
916
|
+
def delete_all_order_items(order_id); end
|
917
|
+
```
|
918
|
+
|
919
|
+
#### Parameters
|
920
|
+
|
921
|
+
| Parameter | Tags | Description |
|
922
|
+
|-----------|------|-------------|
|
923
|
+
| order_id | ``` Required ``` | Order Id |
|
924
|
+
|
925
|
+
|
926
|
+
#### Example Usage
|
927
|
+
|
928
|
+
```ruby
|
929
|
+
order_id = 'orderId'
|
930
|
+
|
931
|
+
result = orders_controller.delete_all_order_items(order_id)
|
932
|
+
|
933
|
+
```
|
934
|
+
|
935
|
+
|
936
|
+
### <a name="update_order_item"></a> update_order_item
|
937
|
+
|
938
|
+
> TODO: Add a method description
|
939
|
+
|
940
|
+
|
941
|
+
```ruby
|
942
|
+
def update_order_item(order_id,
|
943
|
+
item_id,
|
944
|
+
request); end
|
945
|
+
```
|
946
|
+
|
947
|
+
#### Parameters
|
948
|
+
|
949
|
+
| Parameter | Tags | Description |
|
950
|
+
|-----------|------|-------------|
|
951
|
+
| order_id | ``` Required ``` | Order Id |
|
952
|
+
| item_id | ``` Required ``` | Item Id |
|
953
|
+
| request | ``` Required ``` | Item Model |
|
954
|
+
|
955
|
+
|
956
|
+
#### Example Usage
|
957
|
+
|
958
|
+
```ruby
|
959
|
+
order_id = 'orderId'
|
960
|
+
item_id = 'itemId'
|
961
|
+
request = UpdateOrderItemRequest.new
|
962
|
+
|
963
|
+
result = orders_controller.update_order_item(order_id, item_id, request)
|
964
|
+
|
965
|
+
```
|
966
|
+
|
967
|
+
|
968
|
+
### <a name="delete_order_item"></a> delete_order_item
|
969
|
+
|
970
|
+
> TODO: Add a method description
|
971
|
+
|
972
|
+
|
973
|
+
```ruby
|
974
|
+
def delete_order_item(order_id,
|
975
|
+
item_id); end
|
976
|
+
```
|
977
|
+
|
978
|
+
#### Parameters
|
979
|
+
|
980
|
+
| Parameter | Tags | Description |
|
981
|
+
|-----------|------|-------------|
|
982
|
+
| order_id | ``` Required ``` | Order Id |
|
983
|
+
| item_id | ``` Required ``` | Item Id |
|
984
|
+
|
985
|
+
|
986
|
+
#### Example Usage
|
987
|
+
|
988
|
+
```ruby
|
989
|
+
order_id = 'orderId'
|
990
|
+
item_id = 'itemId'
|
991
|
+
|
992
|
+
result = orders_controller.delete_order_item(order_id, item_id)
|
993
|
+
|
994
|
+
```
|
995
|
+
|
996
|
+
|
997
|
+
### <a name="create_order_item"></a> create_order_item
|
998
|
+
|
999
|
+
> TODO: Add a method description
|
1000
|
+
|
1001
|
+
|
1002
|
+
```ruby
|
1003
|
+
def create_order_item(order_id,
|
1004
|
+
request); end
|
1005
|
+
```
|
1006
|
+
|
1007
|
+
#### Parameters
|
1008
|
+
|
1009
|
+
| Parameter | Tags | Description |
|
1010
|
+
|-----------|------|-------------|
|
1011
|
+
| order_id | ``` Required ``` | Order Id |
|
1012
|
+
| request | ``` Required ``` | Order Item Model |
|
1013
|
+
|
1014
|
+
|
1015
|
+
#### Example Usage
|
1016
|
+
|
1017
|
+
```ruby
|
1018
|
+
order_id = 'orderId'
|
1019
|
+
request = CreateOrderItemRequest.new
|
1020
|
+
|
1021
|
+
result = orders_controller.create_order_item(order_id, request)
|
1022
|
+
|
1023
|
+
```
|
1024
|
+
|
1025
|
+
|
1026
|
+
### <a name="get_order_item"></a> get_order_item
|
1027
|
+
|
1028
|
+
> TODO: Add a method description
|
1029
|
+
|
1030
|
+
|
1031
|
+
```ruby
|
1032
|
+
def get_order_item(order_id,
|
1033
|
+
item_id); end
|
1034
|
+
```
|
1035
|
+
|
1036
|
+
#### Parameters
|
1037
|
+
|
1038
|
+
| Parameter | Tags | Description |
|
1039
|
+
|-----------|------|-------------|
|
1040
|
+
| order_id | ``` Required ``` | Order Id |
|
1041
|
+
| item_id | ``` Required ``` | Item Id |
|
1042
|
+
|
1043
|
+
|
1044
|
+
#### Example Usage
|
1045
|
+
|
1046
|
+
```ruby
|
1047
|
+
order_id = 'orderId'
|
1048
|
+
item_id = 'itemId'
|
1049
|
+
|
1050
|
+
result = orders_controller.get_order_item(order_id, item_id)
|
1051
|
+
|
1052
|
+
```
|
1053
|
+
|
1054
|
+
|
1055
|
+
### <a name="update_order_status"></a> update_order_status
|
1056
|
+
|
1057
|
+
> TODO: Add a method description
|
1058
|
+
|
1059
|
+
|
1060
|
+
```ruby
|
1061
|
+
def update_order_status(id,
|
1062
|
+
request); end
|
1063
|
+
```
|
1064
|
+
|
1065
|
+
#### Parameters
|
1066
|
+
|
1067
|
+
| Parameter | Tags | Description |
|
1068
|
+
|-----------|------|-------------|
|
1069
|
+
| id | ``` Required ``` | Order Id |
|
1070
|
+
| request | ``` Required ``` | Update Order Model |
|
1071
|
+
|
1072
|
+
|
1073
|
+
#### Example Usage
|
1074
|
+
|
1075
|
+
```ruby
|
1076
|
+
id = 'id'
|
1077
|
+
request = UpdateOrderStatusRequest.new
|
1078
|
+
|
1079
|
+
result = orders_controller.update_order_status(id, request)
|
1080
|
+
|
1081
|
+
```
|
1082
|
+
|
1083
|
+
|
1084
|
+
[Back to List of Controllers](#list_of_controllers)
|
1085
|
+
|
1086
|
+
## <a name="plans_controller"></a> PlansController
|
1087
|
+
|
1088
|
+
### Get singleton instance
|
1089
|
+
|
1090
|
+
The singleton instance of the ``` PlansController ``` class can be accessed from the API Client.
|
1091
|
+
|
1092
|
+
```ruby
|
1093
|
+
plans_controller = client.plans
|
1094
|
+
```
|
1095
|
+
|
1096
|
+
### <a name="create_plan_item"></a> create_plan_item
|
1097
|
+
|
1098
|
+
> Adds a new item to a plan
|
1099
|
+
|
1100
|
+
|
1101
|
+
```ruby
|
1102
|
+
def create_plan_item(plan_id,
|
1103
|
+
request); end
|
1104
|
+
```
|
1105
|
+
|
1106
|
+
#### Parameters
|
1107
|
+
|
1108
|
+
| Parameter | Tags | Description |
|
1109
|
+
|-----------|------|-------------|
|
1110
|
+
| plan_id | ``` Required ``` | Plan id |
|
1111
|
+
| request | ``` Required ``` | Request for creating a plan item |
|
1112
|
+
|
1113
|
+
|
1114
|
+
#### Example Usage
|
1115
|
+
|
1116
|
+
```ruby
|
1117
|
+
plan_id = 'plan_id'
|
1118
|
+
request = CreatePlanItemRequest.new
|
1119
|
+
|
1120
|
+
result = plans_controller.create_plan_item(plan_id, request)
|
1121
|
+
|
1122
|
+
```
|
1123
|
+
|
1124
|
+
|
1125
|
+
### <a name="update_plan_item"></a> update_plan_item
|
1126
|
+
|
1127
|
+
> Updates a plan item
|
1128
|
+
|
1129
|
+
|
1130
|
+
```ruby
|
1131
|
+
def update_plan_item(plan_id,
|
1132
|
+
plan_item_id,
|
1133
|
+
body); end
|
1134
|
+
```
|
1135
|
+
|
1136
|
+
#### Parameters
|
1137
|
+
|
1138
|
+
| Parameter | Tags | Description |
|
1139
|
+
|-----------|------|-------------|
|
1140
|
+
| plan_id | ``` Required ``` | Plan id |
|
1141
|
+
| plan_item_id | ``` Required ``` | Plan item id |
|
1142
|
+
| body | ``` Required ``` | Request for updating the plan item |
|
1143
|
+
|
1144
|
+
|
1145
|
+
#### Example Usage
|
1146
|
+
|
1147
|
+
```ruby
|
1148
|
+
plan_id = 'plan_id'
|
1149
|
+
plan_item_id = 'plan_item_id'
|
1150
|
+
body = UpdatePlanItemRequest.new
|
1151
|
+
|
1152
|
+
result = plans_controller.update_plan_item(plan_id, plan_item_id, body)
|
1153
|
+
|
1154
|
+
```
|
1155
|
+
|
1156
|
+
|
1157
|
+
### <a name="get_plan"></a> get_plan
|
1158
|
+
|
1159
|
+
> Gets a plan
|
1160
|
+
|
1161
|
+
|
1162
|
+
```ruby
|
1163
|
+
def get_plan(plan_id); end
|
1164
|
+
```
|
1165
|
+
|
1166
|
+
#### Parameters
|
1167
|
+
|
1168
|
+
| Parameter | Tags | Description |
|
1169
|
+
|-----------|------|-------------|
|
1170
|
+
| plan_id | ``` Required ``` | Plan id |
|
1171
|
+
|
1172
|
+
|
1173
|
+
#### Example Usage
|
1174
|
+
|
1175
|
+
```ruby
|
1176
|
+
plan_id = 'plan_id'
|
1177
|
+
|
1178
|
+
result = plans_controller.get_plan(plan_id)
|
1179
|
+
|
1180
|
+
```
|
1181
|
+
|
1182
|
+
|
1183
|
+
### <a name="delete_plan"></a> delete_plan
|
1184
|
+
|
1185
|
+
> Deletes a plan
|
1186
|
+
|
1187
|
+
|
1188
|
+
```ruby
|
1189
|
+
def delete_plan(plan_id); end
|
1190
|
+
```
|
1191
|
+
|
1192
|
+
#### Parameters
|
1193
|
+
|
1194
|
+
| Parameter | Tags | Description |
|
1195
|
+
|-----------|------|-------------|
|
1196
|
+
| plan_id | ``` Required ``` | Plan id |
|
1197
|
+
|
1198
|
+
|
1199
|
+
#### Example Usage
|
1200
|
+
|
1201
|
+
```ruby
|
1202
|
+
plan_id = 'plan_id'
|
1203
|
+
|
1204
|
+
result = plans_controller.delete_plan(plan_id)
|
1205
|
+
|
1206
|
+
```
|
1207
|
+
|
1208
|
+
|
1209
|
+
### <a name="update_plan"></a> update_plan
|
1210
|
+
|
1211
|
+
> Updates a plan
|
1212
|
+
|
1213
|
+
|
1214
|
+
```ruby
|
1215
|
+
def update_plan(plan_id,
|
1216
|
+
request); end
|
1217
|
+
```
|
1218
|
+
|
1219
|
+
#### Parameters
|
1220
|
+
|
1221
|
+
| Parameter | Tags | Description |
|
1222
|
+
|-----------|------|-------------|
|
1223
|
+
| plan_id | ``` Required ``` | Plan id |
|
1224
|
+
| request | ``` Required ``` | Request for updating a plan |
|
1225
|
+
|
1226
|
+
|
1227
|
+
#### Example Usage
|
1228
|
+
|
1229
|
+
```ruby
|
1230
|
+
plan_id = 'plan_id'
|
1231
|
+
request = UpdatePlanRequest.new
|
1232
|
+
|
1233
|
+
result = plans_controller.update_plan(plan_id, request)
|
1234
|
+
|
1235
|
+
```
|
1236
|
+
|
1237
|
+
|
1238
|
+
### <a name="create_plan"></a> create_plan
|
1239
|
+
|
1240
|
+
> Creates a new plan
|
1241
|
+
|
1242
|
+
|
1243
|
+
```ruby
|
1244
|
+
def create_plan(body); end
|
1245
|
+
```
|
1246
|
+
|
1247
|
+
#### Parameters
|
1248
|
+
|
1249
|
+
| Parameter | Tags | Description |
|
1250
|
+
|-----------|------|-------------|
|
1251
|
+
| body | ``` Required ``` | Request for creating a plan |
|
1252
|
+
|
1253
|
+
|
1254
|
+
#### Example Usage
|
1255
|
+
|
1256
|
+
```ruby
|
1257
|
+
body = CreatePlanRequest.new
|
1258
|
+
|
1259
|
+
result = plans_controller.create_plan(body)
|
1260
|
+
|
1261
|
+
```
|
1262
|
+
|
1263
|
+
|
1264
|
+
### <a name="get_plans"></a> get_plans
|
1265
|
+
|
1266
|
+
> Gets all plans
|
1267
|
+
|
1268
|
+
|
1269
|
+
```ruby
|
1270
|
+
def get_plans(page = nil,
|
1271
|
+
size = nil,
|
1272
|
+
name = nil,
|
1273
|
+
status = nil,
|
1274
|
+
billing_type = nil,
|
1275
|
+
created_since = nil,
|
1276
|
+
created_until = nil); end
|
1277
|
+
```
|
1278
|
+
|
1279
|
+
#### Parameters
|
1280
|
+
|
1281
|
+
| Parameter | Tags | Description |
|
1282
|
+
|-----------|------|-------------|
|
1283
|
+
| page | ``` Optional ``` | Page number |
|
1284
|
+
| size | ``` Optional ``` | Page size |
|
1285
|
+
| name | ``` Optional ``` | Filter for Plan's name |
|
1286
|
+
| status | ``` Optional ``` | Filter for Plan's status |
|
1287
|
+
| billing_type | ``` Optional ``` | Filter for plan's billing type |
|
1288
|
+
| created_since | ``` Optional ``` | Filter for plan's creation date start range |
|
1289
|
+
| created_until | ``` Optional ``` | Filter for plan's creation date end range |
|
1290
|
+
|
1291
|
+
|
1292
|
+
#### Example Usage
|
1293
|
+
|
1294
|
+
```ruby
|
1295
|
+
page = 135
|
1296
|
+
size = 135
|
1297
|
+
name = 'name'
|
1298
|
+
status = 'status'
|
1299
|
+
billing_type = 'billing_type'
|
1300
|
+
created_since = DateTime.now
|
1301
|
+
created_until = DateTime.now
|
1302
|
+
|
1303
|
+
result = plans_controller.get_plans(page, size, name, status, billing_type, created_since, created_until)
|
1304
|
+
|
1305
|
+
```
|
1306
|
+
|
1307
|
+
|
1308
|
+
### <a name="update_plan_metadata"></a> update_plan_metadata
|
1309
|
+
|
1310
|
+
> Updates the metadata from a plan
|
1311
|
+
|
1312
|
+
|
1313
|
+
```ruby
|
1314
|
+
def update_plan_metadata(plan_id,
|
1315
|
+
request); end
|
1316
|
+
```
|
1317
|
+
|
1318
|
+
#### Parameters
|
1319
|
+
|
1320
|
+
| Parameter | Tags | Description |
|
1321
|
+
|-----------|------|-------------|
|
1322
|
+
| plan_id | ``` Required ``` | The plan id |
|
1323
|
+
| request | ``` Required ``` | Request for updating the plan metadata |
|
1324
|
+
|
1325
|
+
|
1326
|
+
#### Example Usage
|
1327
|
+
|
1328
|
+
```ruby
|
1329
|
+
plan_id = 'plan_id'
|
1330
|
+
request = UpdateMetadataRequest.new
|
1331
|
+
|
1332
|
+
result = plans_controller.update_plan_metadata(plan_id, request)
|
1333
|
+
|
1334
|
+
```
|
1335
|
+
|
1336
|
+
|
1337
|
+
### <a name="get_plan_item"></a> get_plan_item
|
1338
|
+
|
1339
|
+
> Gets a plan item
|
1340
|
+
|
1341
|
+
|
1342
|
+
```ruby
|
1343
|
+
def get_plan_item(plan_id,
|
1344
|
+
plan_item_id); end
|
1345
|
+
```
|
1346
|
+
|
1347
|
+
#### Parameters
|
1348
|
+
|
1349
|
+
| Parameter | Tags | Description |
|
1350
|
+
|-----------|------|-------------|
|
1351
|
+
| plan_id | ``` Required ``` | Plan id |
|
1352
|
+
| plan_item_id | ``` Required ``` | Plan item id |
|
1353
|
+
|
1354
|
+
|
1355
|
+
#### Example Usage
|
1356
|
+
|
1357
|
+
```ruby
|
1358
|
+
plan_id = 'plan_id'
|
1359
|
+
plan_item_id = 'plan_item_id'
|
1360
|
+
|
1361
|
+
result = plans_controller.get_plan_item(plan_id, plan_item_id)
|
1362
|
+
|
1363
|
+
```
|
1364
|
+
|
1365
|
+
|
1366
|
+
### <a name="delete_plan_item"></a> delete_plan_item
|
1367
|
+
|
1368
|
+
> Removes an item from a plan
|
1369
|
+
|
1370
|
+
|
1371
|
+
```ruby
|
1372
|
+
def delete_plan_item(plan_id,
|
1373
|
+
plan_item_id); end
|
1374
|
+
```
|
1375
|
+
|
1376
|
+
#### Parameters
|
1377
|
+
|
1378
|
+
| Parameter | Tags | Description |
|
1379
|
+
|-----------|------|-------------|
|
1380
|
+
| plan_id | ``` Required ``` | Plan id |
|
1381
|
+
| plan_item_id | ``` Required ``` | Plan item id |
|
1382
|
+
|
1383
|
+
|
1384
|
+
#### Example Usage
|
1385
|
+
|
1386
|
+
```ruby
|
1387
|
+
plan_id = 'plan_id'
|
1388
|
+
plan_item_id = 'plan_item_id'
|
1389
|
+
|
1390
|
+
result = plans_controller.delete_plan_item(plan_id, plan_item_id)
|
1391
|
+
|
1392
|
+
```
|
1393
|
+
|
1394
|
+
|
1395
|
+
[Back to List of Controllers](#list_of_controllers)
|
1396
|
+
|
1397
|
+
## <a name="invoices_controller"></a> InvoicesController
|
1398
|
+
|
1399
|
+
### Get singleton instance
|
1400
|
+
|
1401
|
+
The singleton instance of the ``` InvoicesController ``` class can be accessed from the API Client.
|
1402
|
+
|
1403
|
+
```ruby
|
1404
|
+
invoices_controller = client.invoices
|
1405
|
+
```
|
1406
|
+
|
1407
|
+
### <a name="cancel_invoice"></a> cancel_invoice
|
1408
|
+
|
1409
|
+
> Cancels an invoice
|
1410
|
+
|
1411
|
+
|
1412
|
+
```ruby
|
1413
|
+
def cancel_invoice(invoice_id); end
|
1414
|
+
```
|
1415
|
+
|
1416
|
+
#### Parameters
|
1417
|
+
|
1418
|
+
| Parameter | Tags | Description |
|
1419
|
+
|-----------|------|-------------|
|
1420
|
+
| invoice_id | ``` Required ``` | Invoice id |
|
1421
|
+
|
1422
|
+
|
1423
|
+
#### Example Usage
|
1424
|
+
|
1425
|
+
```ruby
|
1426
|
+
invoice_id = 'invoice_id'
|
1427
|
+
|
1428
|
+
result = invoices_controller.cancel_invoice(invoice_id)
|
1429
|
+
|
1430
|
+
```
|
1431
|
+
|
1432
|
+
|
1433
|
+
### <a name="get_invoice"></a> get_invoice
|
1434
|
+
|
1435
|
+
> Gets an invoice
|
1436
|
+
|
1437
|
+
|
1438
|
+
```ruby
|
1439
|
+
def get_invoice(invoice_id); end
|
1440
|
+
```
|
1441
|
+
|
1442
|
+
#### Parameters
|
1443
|
+
|
1444
|
+
| Parameter | Tags | Description |
|
1445
|
+
|-----------|------|-------------|
|
1446
|
+
| invoice_id | ``` Required ``` | Invoice Id |
|
1447
|
+
|
1448
|
+
|
1449
|
+
#### Example Usage
|
1450
|
+
|
1451
|
+
```ruby
|
1452
|
+
invoice_id = 'invoice_id'
|
1453
|
+
|
1454
|
+
result = invoices_controller.get_invoice(invoice_id)
|
1455
|
+
|
1456
|
+
```
|
1457
|
+
|
1458
|
+
|
1459
|
+
### <a name="create_invoice"></a> create_invoice
|
1460
|
+
|
1461
|
+
> Create an Invoice
|
1462
|
+
|
1463
|
+
|
1464
|
+
```ruby
|
1465
|
+
def create_invoice(subscription_id,
|
1466
|
+
cycle_id); end
|
1467
|
+
```
|
1468
|
+
|
1469
|
+
#### Parameters
|
1470
|
+
|
1471
|
+
| Parameter | Tags | Description |
|
1472
|
+
|-----------|------|-------------|
|
1473
|
+
| subscription_id | ``` Required ``` | Subscription Id |
|
1474
|
+
| cycle_id | ``` Required ``` | Cycle Id |
|
1475
|
+
|
1476
|
+
|
1477
|
+
#### Example Usage
|
1478
|
+
|
1479
|
+
```ruby
|
1480
|
+
subscription_id = 'subscription_id'
|
1481
|
+
cycle_id = 'cycle_id'
|
1482
|
+
|
1483
|
+
result = invoices_controller.create_invoice(subscription_id, cycle_id)
|
1484
|
+
|
1485
|
+
```
|
1486
|
+
|
1487
|
+
|
1488
|
+
### <a name="update_invoice_status"></a> update_invoice_status
|
1489
|
+
|
1490
|
+
> Updates the status from an invoice
|
1491
|
+
|
1492
|
+
|
1493
|
+
```ruby
|
1494
|
+
def update_invoice_status(invoice_id,
|
1495
|
+
request); end
|
1496
|
+
```
|
1497
|
+
|
1498
|
+
#### Parameters
|
1499
|
+
|
1500
|
+
| Parameter | Tags | Description |
|
1501
|
+
|-----------|------|-------------|
|
1502
|
+
| invoice_id | ``` Required ``` | Invoice Id |
|
1503
|
+
| request | ``` Required ``` | Request for updating an invoice's status |
|
1504
|
+
|
1505
|
+
|
1506
|
+
#### Example Usage
|
1507
|
+
|
1508
|
+
```ruby
|
1509
|
+
invoice_id = 'invoice_id'
|
1510
|
+
request = UpdateInvoiceStatusRequest.new
|
1511
|
+
|
1512
|
+
result = invoices_controller.update_invoice_status(invoice_id, request)
|
1513
|
+
|
1514
|
+
```
|
1515
|
+
|
1516
|
+
|
1517
|
+
### <a name="get_invoices"></a> get_invoices
|
1518
|
+
|
1519
|
+
> Gets all invoices
|
1520
|
+
|
1521
|
+
|
1522
|
+
```ruby
|
1523
|
+
def get_invoices(page = nil,
|
1524
|
+
size = nil,
|
1525
|
+
code = nil,
|
1526
|
+
customer_id = nil,
|
1527
|
+
subscription_id = nil,
|
1528
|
+
created_since = nil,
|
1529
|
+
created_until = nil,
|
1530
|
+
status = nil,
|
1531
|
+
due_since = nil,
|
1532
|
+
due_until = nil); end
|
1533
|
+
```
|
1534
|
+
|
1535
|
+
#### Parameters
|
1536
|
+
|
1537
|
+
| Parameter | Tags | Description |
|
1538
|
+
|-----------|------|-------------|
|
1539
|
+
| page | ``` Optional ``` | Page number |
|
1540
|
+
| size | ``` Optional ``` | Page size |
|
1541
|
+
| code | ``` Optional ``` | Filter for Invoice's code |
|
1542
|
+
| customer_id | ``` Optional ``` | Filter for Invoice's customer id |
|
1543
|
+
| subscription_id | ``` Optional ``` | Filter for Invoice's subscription id |
|
1544
|
+
| created_since | ``` Optional ``` | Filter for Invoice's creation date start range |
|
1545
|
+
| created_until | ``` Optional ``` | Filter for Invoices creation date end range |
|
1546
|
+
| status | ``` Optional ``` | Filter for Invoice's status |
|
1547
|
+
| due_since | ``` Optional ``` | Filter for Invoice's due date start range |
|
1548
|
+
| due_until | ``` Optional ``` | Filter for Invoice's due date end range |
|
1549
|
+
|
1550
|
+
|
1551
|
+
#### Example Usage
|
1552
|
+
|
1553
|
+
```ruby
|
1554
|
+
page = 135
|
1555
|
+
size = 135
|
1556
|
+
code = 'code'
|
1557
|
+
customer_id = 'customer_id'
|
1558
|
+
subscription_id = 'subscription_id'
|
1559
|
+
created_since = DateTime.now
|
1560
|
+
created_until = DateTime.now
|
1561
|
+
status = 'status'
|
1562
|
+
due_since = DateTime.now
|
1563
|
+
due_until = DateTime.now
|
1564
|
+
|
1565
|
+
result = invoices_controller.get_invoices(page, size, code, customer_id, subscription_id, created_since, created_until, status, due_since, due_until)
|
1566
|
+
|
1567
|
+
```
|
1568
|
+
|
1569
|
+
|
1570
|
+
### <a name="update_invoice_metadata"></a> update_invoice_metadata
|
1571
|
+
|
1572
|
+
> Updates the metadata from an invoice
|
1573
|
+
|
1574
|
+
|
1575
|
+
```ruby
|
1576
|
+
def update_invoice_metadata(invoice_id,
|
1577
|
+
request); end
|
1578
|
+
```
|
1579
|
+
|
1580
|
+
#### Parameters
|
1581
|
+
|
1582
|
+
| Parameter | Tags | Description |
|
1583
|
+
|-----------|------|-------------|
|
1584
|
+
| invoice_id | ``` Required ``` | The invoice id |
|
1585
|
+
| request | ``` Required ``` | Request for updating the invoice metadata |
|
537
1586
|
|
538
1587
|
|
539
1588
|
#### Example Usage
|
540
1589
|
|
541
1590
|
```ruby
|
542
|
-
|
543
|
-
|
1591
|
+
invoice_id = 'invoice_id'
|
1592
|
+
request = UpdateMetadataRequest.new
|
544
1593
|
|
545
|
-
result =
|
1594
|
+
result = invoices_controller.update_invoice_metadata(invoice_id, request)
|
546
1595
|
|
547
1596
|
```
|
548
1597
|
|
549
1598
|
|
550
|
-
|
1599
|
+
[Back to List of Controllers](#list_of_controllers)
|
551
1600
|
|
552
|
-
|
1601
|
+
## <a name="customers_controller"></a> CustomersController
|
1602
|
+
|
1603
|
+
### Get singleton instance
|
553
1604
|
|
1605
|
+
The singleton instance of the ``` CustomersController ``` class can be accessed from the API Client.
|
554
1606
|
|
555
1607
|
```ruby
|
556
|
-
|
557
|
-
|
1608
|
+
customers_controller = client.customers
|
1609
|
+
```
|
1610
|
+
|
1611
|
+
### <a name="update_card"></a> update_card
|
1612
|
+
|
1613
|
+
> Updates a card
|
1614
|
+
|
1615
|
+
|
1616
|
+
```ruby
|
1617
|
+
def update_card(customer_id,
|
1618
|
+
card_id,
|
1619
|
+
request); end
|
558
1620
|
```
|
559
1621
|
|
560
1622
|
#### Parameters
|
@@ -562,28 +1624,31 @@ def delete_address(customer_id,
|
|
562
1624
|
| Parameter | Tags | Description |
|
563
1625
|
|-----------|------|-------------|
|
564
1626
|
| customer_id | ``` Required ``` | Customer Id |
|
565
|
-
|
|
1627
|
+
| card_id | ``` Required ``` | Card id |
|
1628
|
+
| request | ``` Required ``` | Request for updating a card |
|
566
1629
|
|
567
1630
|
|
568
1631
|
#### Example Usage
|
569
1632
|
|
570
1633
|
```ruby
|
571
1634
|
customer_id = 'customer_id'
|
572
|
-
|
1635
|
+
card_id = 'card_id'
|
1636
|
+
request = UpdateCardRequest.new
|
573
1637
|
|
574
|
-
result =
|
1638
|
+
result = customers_controller.update_card(customer_id, card_id, request)
|
575
1639
|
|
576
1640
|
```
|
577
1641
|
|
578
1642
|
|
579
|
-
### <a name="
|
1643
|
+
### <a name="update_address"></a> update_address
|
580
1644
|
|
581
|
-
>
|
1645
|
+
> Updates an address
|
582
1646
|
|
583
1647
|
|
584
1648
|
```ruby
|
585
|
-
def
|
586
|
-
|
1649
|
+
def update_address(customer_id,
|
1650
|
+
address_id,
|
1651
|
+
request); end
|
587
1652
|
```
|
588
1653
|
|
589
1654
|
#### Parameters
|
@@ -591,115 +1656,115 @@ def delete_card(customer_id,
|
|
591
1656
|
| Parameter | Tags | Description |
|
592
1657
|
|-----------|------|-------------|
|
593
1658
|
| customer_id | ``` Required ``` | Customer Id |
|
594
|
-
|
|
1659
|
+
| address_id | ``` Required ``` | Address Id |
|
1660
|
+
| request | ``` Required ``` | Request for updating an address |
|
595
1661
|
|
596
1662
|
|
597
1663
|
#### Example Usage
|
598
1664
|
|
599
1665
|
```ruby
|
600
1666
|
customer_id = 'customer_id'
|
601
|
-
|
1667
|
+
address_id = 'address_id'
|
1668
|
+
request = UpdateAddressRequest.new
|
602
1669
|
|
603
|
-
result =
|
1670
|
+
result = customers_controller.update_address(customer_id, address_id, request)
|
604
1671
|
|
605
1672
|
```
|
606
1673
|
|
607
1674
|
|
608
|
-
### <a name="
|
1675
|
+
### <a name="create_customer"></a> create_customer
|
609
1676
|
|
610
|
-
> Creates a new
|
1677
|
+
> Creates a new customer
|
611
1678
|
|
612
1679
|
|
613
1680
|
```ruby
|
614
|
-
def
|
615
|
-
request); end
|
1681
|
+
def create_customer(request); end
|
616
1682
|
```
|
617
1683
|
|
618
1684
|
#### Parameters
|
619
1685
|
|
620
1686
|
| Parameter | Tags | Description |
|
621
1687
|
|-----------|------|-------------|
|
622
|
-
|
|
623
|
-
| request | ``` Required ``` | Request for creating an address |
|
1688
|
+
| request | ``` Required ``` | Request for creating a customer |
|
624
1689
|
|
625
1690
|
|
626
1691
|
#### Example Usage
|
627
1692
|
|
628
1693
|
```ruby
|
629
|
-
|
630
|
-
request = CreateAddressRequest.new
|
1694
|
+
request = CreateCustomerRequest.new
|
631
1695
|
|
632
|
-
result =
|
1696
|
+
result = customers_controller.create_customer(request)
|
633
1697
|
|
634
1698
|
```
|
635
1699
|
|
636
1700
|
|
637
|
-
### <a name="
|
1701
|
+
### <a name="get_customer"></a> get_customer
|
638
1702
|
|
639
|
-
> Get a customer
|
1703
|
+
> Get a customer
|
640
1704
|
|
641
1705
|
|
642
1706
|
```ruby
|
643
|
-
def
|
644
|
-
card_id); end
|
1707
|
+
def get_customer(customer_id); end
|
645
1708
|
```
|
646
1709
|
|
647
1710
|
#### Parameters
|
648
1711
|
|
649
1712
|
| Parameter | Tags | Description |
|
650
1713
|
|-----------|------|-------------|
|
651
|
-
| customer_id | ``` Required ``` | Customer
|
652
|
-
| card_id | ``` Required ``` | Card id |
|
1714
|
+
| customer_id | ``` Required ``` | Customer Id |
|
653
1715
|
|
654
1716
|
|
655
1717
|
#### Example Usage
|
656
1718
|
|
657
1719
|
```ruby
|
658
1720
|
customer_id = 'customer_id'
|
659
|
-
card_id = 'card_id'
|
660
1721
|
|
661
|
-
result =
|
1722
|
+
result = customers_controller.get_customer(customer_id)
|
662
1723
|
|
663
1724
|
```
|
664
1725
|
|
665
1726
|
|
666
|
-
### <a name="
|
1727
|
+
### <a name="get_access_tokens"></a> get_access_tokens
|
667
1728
|
|
668
|
-
>
|
1729
|
+
> Get all access tokens from a customer
|
669
1730
|
|
670
1731
|
|
671
1732
|
```ruby
|
672
|
-
def
|
673
|
-
|
1733
|
+
def get_access_tokens(customer_id,
|
1734
|
+
page = nil,
|
1735
|
+
size = nil); end
|
674
1736
|
```
|
675
1737
|
|
676
1738
|
#### Parameters
|
677
1739
|
|
678
1740
|
| Parameter | Tags | Description |
|
679
1741
|
|-----------|------|-------------|
|
680
|
-
| customer_id | ``` Required ``` | Customer
|
681
|
-
|
|
1742
|
+
| customer_id | ``` Required ``` | Customer Id |
|
1743
|
+
| page | ``` Optional ``` | Page number |
|
1744
|
+
| size | ``` Optional ``` | Page size |
|
682
1745
|
|
683
1746
|
|
684
1747
|
#### Example Usage
|
685
1748
|
|
686
1749
|
```ruby
|
687
1750
|
customer_id = 'customer_id'
|
688
|
-
|
1751
|
+
page = 135
|
1752
|
+
size = 135
|
689
1753
|
|
690
|
-
result =
|
1754
|
+
result = customers_controller.get_access_tokens(customer_id, page, size)
|
691
1755
|
|
692
1756
|
```
|
693
1757
|
|
694
1758
|
|
695
|
-
### <a name="
|
1759
|
+
### <a name="get_addresses"></a> get_addresses
|
696
1760
|
|
697
|
-
>
|
1761
|
+
> Gets all adressess from a customer
|
698
1762
|
|
699
1763
|
|
700
1764
|
```ruby
|
701
|
-
def
|
702
|
-
|
1765
|
+
def get_addresses(customer_id,
|
1766
|
+
page = nil,
|
1767
|
+
size = nil); end
|
703
1768
|
```
|
704
1769
|
|
705
1770
|
#### Parameters
|
@@ -707,27 +1772,31 @@ def update_customer(customer_id,
|
|
707
1772
|
| Parameter | Tags | Description |
|
708
1773
|
|-----------|------|-------------|
|
709
1774
|
| customer_id | ``` Required ``` | Customer id |
|
710
|
-
|
|
1775
|
+
| page | ``` Optional ``` | Page number |
|
1776
|
+
| size | ``` Optional ``` | Page size |
|
711
1777
|
|
712
1778
|
|
713
1779
|
#### Example Usage
|
714
1780
|
|
715
1781
|
```ruby
|
716
1782
|
customer_id = 'customer_id'
|
717
|
-
|
1783
|
+
page = 135
|
1784
|
+
size = 135
|
718
1785
|
|
719
|
-
result =
|
1786
|
+
result = customers_controller.get_addresses(customer_id, page, size)
|
720
1787
|
|
721
1788
|
```
|
722
1789
|
|
723
1790
|
|
724
|
-
### <a name="
|
1791
|
+
### <a name="get_cards"></a> get_cards
|
725
1792
|
|
726
|
-
>
|
1793
|
+
> Get all cards from a customer
|
727
1794
|
|
728
1795
|
|
729
1796
|
```ruby
|
730
|
-
def
|
1797
|
+
def get_cards(customer_id,
|
1798
|
+
page = nil,
|
1799
|
+
size = nil); end
|
731
1800
|
```
|
732
1801
|
|
733
1802
|
#### Parameters
|
@@ -735,52 +1804,44 @@ def delete_access_tokens(customer_id); end
|
|
735
1804
|
| Parameter | Tags | Description |
|
736
1805
|
|-----------|------|-------------|
|
737
1806
|
| customer_id | ``` Required ``` | Customer Id |
|
1807
|
+
| page | ``` Optional ``` | Page number |
|
1808
|
+
| size | ``` Optional ``` | Page size |
|
738
1809
|
|
739
1810
|
|
740
1811
|
#### Example Usage
|
741
1812
|
|
742
1813
|
```ruby
|
743
1814
|
customer_id = 'customer_id'
|
1815
|
+
page = 135
|
1816
|
+
size = 135
|
744
1817
|
|
745
|
-
result =
|
1818
|
+
result = customers_controller.get_cards(customer_id, page, size)
|
746
1819
|
|
747
1820
|
```
|
748
1821
|
|
749
1822
|
|
750
|
-
### <a name="
|
1823
|
+
### <a name="delete_access_tokens"></a> delete_access_tokens
|
751
1824
|
|
752
|
-
>
|
1825
|
+
> Delete a Customer's access tokens
|
753
1826
|
|
754
1827
|
|
755
1828
|
```ruby
|
756
|
-
def
|
757
|
-
document = nil,
|
758
|
-
page = 1,
|
759
|
-
size = 10,
|
760
|
-
email = nil); end
|
1829
|
+
def delete_access_tokens(customer_id); end
|
761
1830
|
```
|
762
1831
|
|
763
1832
|
#### Parameters
|
764
1833
|
|
765
1834
|
| Parameter | Tags | Description |
|
766
1835
|
|-----------|------|-------------|
|
767
|
-
|
|
768
|
-
| document | ``` Optional ``` | Document of the Customer |
|
769
|
-
| page | ``` Optional ``` ``` DefaultValue ``` | Current page the the search |
|
770
|
-
| size | ``` Optional ``` ``` DefaultValue ``` | Quantity pages of the search |
|
771
|
-
| email | ``` Optional ``` | Customer's email |
|
1836
|
+
| customer_id | ``` Required ``` | Customer Id |
|
772
1837
|
|
773
1838
|
|
774
1839
|
#### Example Usage
|
775
1840
|
|
776
1841
|
```ruby
|
777
|
-
|
778
|
-
document = 'document'
|
779
|
-
page = 1
|
780
|
-
size = 10
|
781
|
-
email = 'email'
|
1842
|
+
customer_id = 'customer_id'
|
782
1843
|
|
783
|
-
result =
|
1844
|
+
result = customers_controller.delete_access_tokens(customer_id)
|
784
1845
|
|
785
1846
|
```
|
786
1847
|
|
@@ -809,7 +1870,7 @@ def get_access_token(customer_id,
|
|
809
1870
|
customer_id = 'customer_id'
|
810
1871
|
token_id = 'token_id'
|
811
1872
|
|
812
|
-
result =
|
1873
|
+
result = customers_controller.get_access_token(customer_id, token_id)
|
813
1874
|
|
814
1875
|
```
|
815
1876
|
|
@@ -838,7 +1899,7 @@ def create_access_token(customer_id,
|
|
838
1899
|
customer_id = 'customer_id'
|
839
1900
|
request = CreateAccessTokenRequest.new
|
840
1901
|
|
841
|
-
result =
|
1902
|
+
result = customers_controller.create_access_token(customer_id, request)
|
842
1903
|
|
843
1904
|
```
|
844
1905
|
|
@@ -867,7 +1928,7 @@ def delete_access_token(customer_id,
|
|
867
1928
|
customer_id = 'customer_id'
|
868
1929
|
token_id = 'token_id'
|
869
1930
|
|
870
|
-
result =
|
1931
|
+
result = customers_controller.delete_access_token(customer_id, token_id)
|
871
1932
|
|
872
1933
|
```
|
873
1934
|
|
@@ -896,52 +1957,48 @@ def update_customer_metadata(customer_id,
|
|
896
1957
|
customer_id = 'customer_id'
|
897
1958
|
request = UpdateMetadataRequest.new
|
898
1959
|
|
899
|
-
result =
|
1960
|
+
result = customers_controller.update_customer_metadata(customer_id, request)
|
900
1961
|
|
901
1962
|
```
|
902
1963
|
|
903
1964
|
|
904
|
-
### <a name="
|
1965
|
+
### <a name="update_customer"></a> update_customer
|
905
1966
|
|
906
|
-
>
|
1967
|
+
> Updates a customer
|
907
1968
|
|
908
1969
|
|
909
1970
|
```ruby
|
910
|
-
def
|
911
|
-
|
912
|
-
size = nil); end
|
1971
|
+
def update_customer(customer_id,
|
1972
|
+
request); end
|
913
1973
|
```
|
914
1974
|
|
915
1975
|
#### Parameters
|
916
1976
|
|
917
1977
|
| Parameter | Tags | Description |
|
918
1978
|
|-----------|------|-------------|
|
919
|
-
| customer_id | ``` Required ``` | Customer
|
920
|
-
|
|
921
|
-
| size | ``` Optional ``` | Page size |
|
1979
|
+
| customer_id | ``` Required ``` | Customer id |
|
1980
|
+
| request | ``` Required ``` | Request for updating a customer |
|
922
1981
|
|
923
1982
|
|
924
1983
|
#### Example Usage
|
925
1984
|
|
926
1985
|
```ruby
|
927
1986
|
customer_id = 'customer_id'
|
928
|
-
|
929
|
-
size = 60
|
1987
|
+
request = UpdateCustomerRequest.new
|
930
1988
|
|
931
|
-
result =
|
1989
|
+
result = customers_controller.update_customer(customer_id, request)
|
932
1990
|
|
933
1991
|
```
|
934
1992
|
|
935
1993
|
|
936
|
-
### <a name="
|
1994
|
+
### <a name="get_address"></a> get_address
|
937
1995
|
|
938
|
-
>
|
1996
|
+
> Get a customer's address
|
939
1997
|
|
940
1998
|
|
941
1999
|
```ruby
|
942
|
-
def
|
943
|
-
|
944
|
-
size = nil); end
|
2000
|
+
def get_address(customer_id,
|
2001
|
+
address_id); end
|
945
2002
|
```
|
946
2003
|
|
947
2004
|
#### Parameters
|
@@ -949,31 +2006,28 @@ def get_addresses(customer_id,
|
|
949
2006
|
| Parameter | Tags | Description |
|
950
2007
|
|-----------|------|-------------|
|
951
2008
|
| customer_id | ``` Required ``` | Customer id |
|
952
|
-
|
|
953
|
-
| size | ``` Optional ``` | Page size |
|
2009
|
+
| address_id | ``` Required ``` | Address Id |
|
954
2010
|
|
955
2011
|
|
956
2012
|
#### Example Usage
|
957
2013
|
|
958
2014
|
```ruby
|
959
2015
|
customer_id = 'customer_id'
|
960
|
-
|
961
|
-
size = 60
|
2016
|
+
address_id = 'address_id'
|
962
2017
|
|
963
|
-
result =
|
2018
|
+
result = customers_controller.get_address(customer_id, address_id)
|
964
2019
|
|
965
2020
|
```
|
966
2021
|
|
967
2022
|
|
968
|
-
### <a name="
|
2023
|
+
### <a name="delete_address"></a> delete_address
|
969
2024
|
|
970
|
-
>
|
2025
|
+
> Delete a Customer's address
|
971
2026
|
|
972
2027
|
|
973
2028
|
```ruby
|
974
|
-
def
|
975
|
-
|
976
|
-
size = nil); end
|
2029
|
+
def delete_address(customer_id,
|
2030
|
+
address_id); end
|
977
2031
|
```
|
978
2032
|
|
979
2033
|
#### Parameters
|
@@ -981,1100 +2035,1115 @@ def get_cards(customer_id,
|
|
981
2035
|
| Parameter | Tags | Description |
|
982
2036
|
|-----------|------|-------------|
|
983
2037
|
| customer_id | ``` Required ``` | Customer Id |
|
984
|
-
|
|
985
|
-
| size | ``` Optional ``` | Page size |
|
2038
|
+
| address_id | ``` Required ``` | Address Id |
|
986
2039
|
|
987
2040
|
|
988
2041
|
#### Example Usage
|
989
2042
|
|
990
2043
|
```ruby
|
991
2044
|
customer_id = 'customer_id'
|
992
|
-
|
993
|
-
size = 19
|
2045
|
+
address_id = 'address_id'
|
994
2046
|
|
995
|
-
result =
|
2047
|
+
result = customers_controller.delete_address(customer_id, address_id)
|
996
2048
|
|
997
2049
|
```
|
998
2050
|
|
999
2051
|
|
1000
|
-
|
2052
|
+
### <a name="delete_card"></a> delete_card
|
1001
2053
|
|
1002
|
-
|
2054
|
+
> Delete a customer's card
|
1003
2055
|
|
1004
|
-
### Get singleton instance
|
1005
2056
|
|
1006
|
-
|
2057
|
+
```ruby
|
2058
|
+
def delete_card(customer_id,
|
2059
|
+
card_id); end
|
2060
|
+
```
|
2061
|
+
|
2062
|
+
#### Parameters
|
2063
|
+
|
2064
|
+
| Parameter | Tags | Description |
|
2065
|
+
|-----------|------|-------------|
|
2066
|
+
| customer_id | ``` Required ``` | Customer Id |
|
2067
|
+
| card_id | ``` Required ``` | Card Id |
|
2068
|
+
|
2069
|
+
|
2070
|
+
#### Example Usage
|
1007
2071
|
|
1008
2072
|
```ruby
|
1009
|
-
|
2073
|
+
customer_id = 'customer_id'
|
2074
|
+
card_id = 'card_id'
|
2075
|
+
|
2076
|
+
result = customers_controller.delete_card(customer_id, card_id)
|
2077
|
+
|
1010
2078
|
```
|
1011
2079
|
|
1012
|
-
### <a name="get_invoice"></a> get_invoice
|
1013
2080
|
|
1014
|
-
|
2081
|
+
### <a name="create_address"></a> create_address
|
2082
|
+
|
2083
|
+
> Creates a new address for a customer
|
1015
2084
|
|
1016
2085
|
|
1017
2086
|
```ruby
|
1018
|
-
def
|
2087
|
+
def create_address(customer_id,
|
2088
|
+
request); end
|
1019
2089
|
```
|
1020
2090
|
|
1021
2091
|
#### Parameters
|
1022
2092
|
|
1023
2093
|
| Parameter | Tags | Description |
|
1024
2094
|
|-----------|------|-------------|
|
1025
|
-
|
|
2095
|
+
| customer_id | ``` Required ``` | Customer Id |
|
2096
|
+
| request | ``` Required ``` | Request for creating an address |
|
1026
2097
|
|
1027
2098
|
|
1028
2099
|
#### Example Usage
|
1029
2100
|
|
1030
2101
|
```ruby
|
1031
|
-
|
2102
|
+
customer_id = 'customer_id'
|
2103
|
+
request = CreateAddressRequest.new
|
1032
2104
|
|
1033
|
-
result =
|
2105
|
+
result = customers_controller.create_address(customer_id, request)
|
1034
2106
|
|
1035
2107
|
```
|
1036
2108
|
|
1037
2109
|
|
1038
|
-
### <a name="
|
2110
|
+
### <a name="get_card"></a> get_card
|
1039
2111
|
|
1040
|
-
>
|
2112
|
+
> Get a customer's card
|
1041
2113
|
|
1042
2114
|
|
1043
2115
|
```ruby
|
1044
|
-
def
|
2116
|
+
def get_card(customer_id,
|
2117
|
+
card_id); end
|
1045
2118
|
```
|
1046
2119
|
|
1047
2120
|
#### Parameters
|
1048
2121
|
|
1049
2122
|
| Parameter | Tags | Description |
|
1050
2123
|
|-----------|------|-------------|
|
1051
|
-
|
|
2124
|
+
| customer_id | ``` Required ``` | Customer id |
|
2125
|
+
| card_id | ``` Required ``` | Card id |
|
1052
2126
|
|
1053
2127
|
|
1054
2128
|
#### Example Usage
|
1055
2129
|
|
1056
2130
|
```ruby
|
1057
|
-
|
2131
|
+
customer_id = 'customer_id'
|
2132
|
+
card_id = 'card_id'
|
1058
2133
|
|
1059
|
-
result =
|
2134
|
+
result = customers_controller.get_card(customer_id, card_id)
|
1060
2135
|
|
1061
2136
|
```
|
1062
2137
|
|
1063
2138
|
|
1064
|
-
### <a name="
|
2139
|
+
### <a name="create_card"></a> create_card
|
1065
2140
|
|
1066
|
-
>
|
2141
|
+
> Creates a new card for a customer
|
1067
2142
|
|
1068
2143
|
|
1069
2144
|
```ruby
|
1070
|
-
def
|
1071
|
-
|
2145
|
+
def create_card(customer_id,
|
2146
|
+
request); end
|
1072
2147
|
```
|
1073
2148
|
|
1074
2149
|
#### Parameters
|
1075
2150
|
|
1076
2151
|
| Parameter | Tags | Description |
|
1077
2152
|
|-----------|------|-------------|
|
1078
|
-
|
|
1079
|
-
| request | ``` Required ``` | Request for
|
2153
|
+
| customer_id | ``` Required ``` | Customer id |
|
2154
|
+
| request | ``` Required ``` | Request for creating a card |
|
1080
2155
|
|
1081
2156
|
|
1082
2157
|
#### Example Usage
|
1083
2158
|
|
1084
2159
|
```ruby
|
1085
|
-
|
1086
|
-
request =
|
2160
|
+
customer_id = 'customer_id'
|
2161
|
+
request = CreateCardRequest.new
|
1087
2162
|
|
1088
|
-
result =
|
2163
|
+
result = customers_controller.create_card(customer_id, request)
|
1089
2164
|
|
1090
2165
|
```
|
1091
2166
|
|
1092
2167
|
|
1093
|
-
### <a name="
|
1094
|
-
|
1095
|
-
>
|
1096
|
-
|
1097
|
-
|
1098
|
-
```ruby
|
1099
|
-
def
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
created_until = nil,
|
1106
|
-
status = nil,
|
1107
|
-
due_since = nil,
|
1108
|
-
due_until = nil); end
|
2168
|
+
### <a name="get_customers"></a> get_customers
|
2169
|
+
|
2170
|
+
> Get all Customers
|
2171
|
+
|
2172
|
+
|
2173
|
+
```ruby
|
2174
|
+
def get_customers(code,
|
2175
|
+
name = nil,
|
2176
|
+
document = nil,
|
2177
|
+
page = 1,
|
2178
|
+
size = 10,
|
2179
|
+
email = nil); end
|
1109
2180
|
```
|
1110
2181
|
|
1111
2182
|
#### Parameters
|
1112
2183
|
|
1113
2184
|
| Parameter | Tags | Description |
|
1114
2185
|
|-----------|------|-------------|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
| created_until | ``` Optional ``` | Filter for Invoices creation date end range |
|
1122
|
-
| status | ``` Optional ``` | Filter for Invoice's status |
|
1123
|
-
| due_since | ``` Optional ``` | Filter for Invoice's due date start range |
|
1124
|
-
| due_until | ``` Optional ``` | Filter for Invoice's due date end range |
|
2186
|
+
| code | ``` Required ``` | Customer's code |
|
2187
|
+
| name | ``` Optional ``` | Name of the Customer |
|
2188
|
+
| document | ``` Optional ``` | Document of the Customer |
|
2189
|
+
| page | ``` Optional ``` ``` DefaultValue ``` | Current page the the search |
|
2190
|
+
| size | ``` Optional ``` ``` DefaultValue ``` | Quantity pages of the search |
|
2191
|
+
| email | ``` Optional ``` | Customer's email |
|
1125
2192
|
|
1126
2193
|
|
1127
2194
|
#### Example Usage
|
1128
2195
|
|
1129
2196
|
```ruby
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
created_until = DateTime.now
|
1137
|
-
status = 'status'
|
1138
|
-
due_since = DateTime.now
|
1139
|
-
due_until = DateTime.now
|
2197
|
+
code = 'Code'
|
2198
|
+
name = 'name'
|
2199
|
+
document = 'document'
|
2200
|
+
page = 1
|
2201
|
+
size = 10
|
2202
|
+
email = 'email'
|
1140
2203
|
|
1141
|
-
result =
|
2204
|
+
result = customers_controller.get_customers(code, name, document, page, size, email)
|
1142
2205
|
|
1143
2206
|
```
|
1144
2207
|
|
1145
2208
|
|
1146
2209
|
[Back to List of Controllers](#list_of_controllers)
|
1147
2210
|
|
1148
|
-
## <a name="
|
2211
|
+
## <a name="charges_controller"></a> ChargesController
|
1149
2212
|
|
1150
2213
|
### Get singleton instance
|
1151
2214
|
|
1152
|
-
The singleton instance of the ```
|
2215
|
+
The singleton instance of the ``` ChargesController ``` class can be accessed from the API Client.
|
1153
2216
|
|
1154
2217
|
```ruby
|
1155
|
-
|
2218
|
+
charges_controller = client.charges
|
1156
2219
|
```
|
1157
2220
|
|
1158
|
-
### <a name="
|
2221
|
+
### <a name="update_charge_card"></a> update_charge_card
|
1159
2222
|
|
1160
|
-
> Updates a
|
2223
|
+
> Updates the card from a charge
|
1161
2224
|
|
1162
2225
|
|
1163
2226
|
```ruby
|
1164
|
-
def
|
1165
|
-
|
1166
|
-
body); end
|
2227
|
+
def update_charge_card(charge_id,
|
2228
|
+
request); end
|
1167
2229
|
```
|
1168
2230
|
|
1169
2231
|
#### Parameters
|
1170
2232
|
|
1171
2233
|
| Parameter | Tags | Description |
|
1172
2234
|
|-----------|------|-------------|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
| body | ``` Required ``` | Request for updating the plan item |
|
2235
|
+
| charge_id | ``` Required ``` | Charge id |
|
2236
|
+
| request | ``` Required ``` | Request for updating a charge's card |
|
1176
2237
|
|
1177
2238
|
|
1178
2239
|
#### Example Usage
|
1179
2240
|
|
1180
2241
|
```ruby
|
1181
|
-
|
1182
|
-
|
1183
|
-
body = UpdatePlanItemRequest.new
|
2242
|
+
charge_id = 'charge_id'
|
2243
|
+
request = UpdateChargeCardRequest.new
|
1184
2244
|
|
1185
|
-
result =
|
2245
|
+
result = charges_controller.update_charge_card(charge_id, request)
|
1186
2246
|
|
1187
2247
|
```
|
1188
2248
|
|
1189
2249
|
|
1190
|
-
### <a name="
|
2250
|
+
### <a name="update_charge_payment_method"></a> update_charge_payment_method
|
1191
2251
|
|
1192
|
-
>
|
2252
|
+
> Updates a charge's payment method
|
1193
2253
|
|
1194
2254
|
|
1195
2255
|
```ruby
|
1196
|
-
def
|
2256
|
+
def update_charge_payment_method(charge_id,
|
2257
|
+
request); end
|
1197
2258
|
```
|
1198
2259
|
|
1199
2260
|
#### Parameters
|
1200
2261
|
|
1201
2262
|
| Parameter | Tags | Description |
|
1202
2263
|
|-----------|------|-------------|
|
1203
|
-
|
|
2264
|
+
| charge_id | ``` Required ``` | Charge id |
|
2265
|
+
| request | ``` Required ``` | Request for updating the payment method from a charge |
|
1204
2266
|
|
1205
2267
|
|
1206
2268
|
#### Example Usage
|
1207
2269
|
|
1208
2270
|
```ruby
|
1209
|
-
|
2271
|
+
charge_id = 'charge_id'
|
2272
|
+
request = UpdateChargePaymentMethodRequest.new
|
1210
2273
|
|
1211
|
-
result =
|
2274
|
+
result = charges_controller.update_charge_payment_method(charge_id, request)
|
1212
2275
|
|
1213
2276
|
```
|
1214
2277
|
|
1215
2278
|
|
1216
|
-
### <a name="
|
2279
|
+
### <a name="create_charge"></a> create_charge
|
1217
2280
|
|
1218
|
-
>
|
2281
|
+
> Creates a new charge
|
1219
2282
|
|
1220
2283
|
|
1221
2284
|
```ruby
|
1222
|
-
def
|
1223
|
-
request); end
|
2285
|
+
def create_charge(request); end
|
1224
2286
|
```
|
1225
2287
|
|
1226
2288
|
#### Parameters
|
1227
2289
|
|
1228
2290
|
| Parameter | Tags | Description |
|
1229
2291
|
|-----------|------|-------------|
|
1230
|
-
|
|
1231
|
-
| request | ``` Required ``` | Request for creating a plan item |
|
2292
|
+
| request | ``` Required ``` | Request for creating a charge |
|
1232
2293
|
|
1233
2294
|
|
1234
2295
|
#### Example Usage
|
1235
2296
|
|
1236
2297
|
```ruby
|
1237
|
-
|
1238
|
-
request = CreatePlanItemRequest.new
|
2298
|
+
request = CreateChargeRequest.new
|
1239
2299
|
|
1240
|
-
result =
|
2300
|
+
result = charges_controller.create_charge(request)
|
1241
2301
|
|
1242
2302
|
```
|
1243
2303
|
|
1244
2304
|
|
1245
|
-
### <a name="
|
2305
|
+
### <a name="get_charge"></a> get_charge
|
1246
2306
|
|
1247
|
-
>
|
2307
|
+
> Get a charge from its id
|
1248
2308
|
|
1249
2309
|
|
1250
2310
|
```ruby
|
1251
|
-
def
|
1252
|
-
request); end
|
2311
|
+
def get_charge(charge_id); end
|
1253
2312
|
```
|
1254
2313
|
|
1255
2314
|
#### Parameters
|
1256
2315
|
|
1257
2316
|
| Parameter | Tags | Description |
|
1258
2317
|
|-----------|------|-------------|
|
1259
|
-
|
|
1260
|
-
| request | ``` Required ``` | Request for updating a plan |
|
2318
|
+
| charge_id | ``` Required ``` | Charge id |
|
1261
2319
|
|
1262
2320
|
|
1263
2321
|
#### Example Usage
|
1264
2322
|
|
1265
2323
|
```ruby
|
1266
|
-
|
1267
|
-
request = UpdatePlanRequest.new
|
2324
|
+
charge_id = 'charge_id'
|
1268
2325
|
|
1269
|
-
result =
|
2326
|
+
result = charges_controller.get_charge(charge_id)
|
1270
2327
|
|
1271
2328
|
```
|
1272
2329
|
|
1273
2330
|
|
1274
|
-
### <a name="
|
2331
|
+
### <a name="retry_charge"></a> retry_charge
|
1275
2332
|
|
1276
|
-
>
|
2333
|
+
> Retries a charge
|
1277
2334
|
|
1278
2335
|
|
1279
2336
|
```ruby
|
1280
|
-
def
|
2337
|
+
def retry_charge(charge_id); end
|
1281
2338
|
```
|
1282
2339
|
|
1283
2340
|
#### Parameters
|
1284
2341
|
|
1285
2342
|
| Parameter | Tags | Description |
|
1286
2343
|
|-----------|------|-------------|
|
1287
|
-
|
|
2344
|
+
| charge_id | ``` Required ``` | Charge id |
|
1288
2345
|
|
1289
2346
|
|
1290
2347
|
#### Example Usage
|
1291
2348
|
|
1292
2349
|
```ruby
|
1293
|
-
|
2350
|
+
charge_id = 'charge_id'
|
1294
2351
|
|
1295
|
-
result =
|
2352
|
+
result = charges_controller.retry_charge(charge_id)
|
1296
2353
|
|
1297
2354
|
```
|
1298
2355
|
|
1299
2356
|
|
1300
|
-
### <a name="
|
2357
|
+
### <a name="get_charges"></a> get_charges
|
1301
2358
|
|
1302
|
-
>
|
2359
|
+
> Lists all charges
|
1303
2360
|
|
1304
2361
|
|
1305
2362
|
```ruby
|
1306
|
-
def
|
2363
|
+
def get_charges(page = nil,
|
2364
|
+
size = nil,
|
2365
|
+
code = nil,
|
2366
|
+
status = nil,
|
2367
|
+
payment_method = nil,
|
2368
|
+
customer_id = nil,
|
2369
|
+
order_id = nil,
|
2370
|
+
created_since = nil,
|
2371
|
+
created_until = nil); end
|
1307
2372
|
```
|
1308
2373
|
|
1309
2374
|
#### Parameters
|
1310
2375
|
|
1311
2376
|
| Parameter | Tags | Description |
|
1312
2377
|
|-----------|------|-------------|
|
1313
|
-
|
|
2378
|
+
| page | ``` Optional ``` | Page number |
|
2379
|
+
| size | ``` Optional ``` | Page size |
|
2380
|
+
| code | ``` Optional ``` | Filter for charge's code |
|
2381
|
+
| status | ``` Optional ``` | Filter for charge's status |
|
2382
|
+
| payment_method | ``` Optional ``` | Filter for charge's payment method |
|
2383
|
+
| customer_id | ``` Optional ``` | Filter for charge's customer id |
|
2384
|
+
| order_id | ``` Optional ``` | Filter for charge's order id |
|
2385
|
+
| created_since | ``` Optional ``` | Filter for the beginning of the range for charge's creation |
|
2386
|
+
| created_until | ``` Optional ``` | Filter for the end of the range for charge's creation |
|
1314
2387
|
|
1315
2388
|
|
1316
2389
|
#### Example Usage
|
1317
2390
|
|
1318
2391
|
```ruby
|
1319
|
-
|
2392
|
+
page = 93
|
2393
|
+
size = 93
|
2394
|
+
code = 'code'
|
2395
|
+
status = 'status'
|
2396
|
+
payment_method = 'payment_method'
|
2397
|
+
customer_id = 'customer_id'
|
2398
|
+
order_id = 'order_id'
|
2399
|
+
created_since = DateTime.now
|
2400
|
+
created_until = DateTime.now
|
1320
2401
|
|
1321
|
-
result =
|
2402
|
+
result = charges_controller.get_charges(page, size, code, status, payment_method, customer_id, order_id, created_since, created_until)
|
1322
2403
|
|
1323
2404
|
```
|
1324
2405
|
|
1325
2406
|
|
1326
|
-
### <a name="
|
2407
|
+
### <a name="update_charge_metadata"></a> update_charge_metadata
|
1327
2408
|
|
1328
|
-
>
|
2409
|
+
> Updates the metadata from a charge
|
1329
2410
|
|
1330
2411
|
|
1331
2412
|
```ruby
|
1332
|
-
def
|
1333
|
-
|
2413
|
+
def update_charge_metadata(charge_id,
|
2414
|
+
request); end
|
1334
2415
|
```
|
1335
2416
|
|
1336
2417
|
#### Parameters
|
1337
2418
|
|
1338
2419
|
| Parameter | Tags | Description |
|
1339
2420
|
|-----------|------|-------------|
|
1340
|
-
|
|
1341
|
-
|
|
2421
|
+
| charge_id | ``` Required ``` | The charge id |
|
2422
|
+
| request | ``` Required ``` | Request for updating the charge metadata |
|
1342
2423
|
|
1343
2424
|
|
1344
2425
|
#### Example Usage
|
1345
2426
|
|
1346
2427
|
```ruby
|
1347
|
-
|
1348
|
-
|
2428
|
+
charge_id = 'charge_id'
|
2429
|
+
request = UpdateMetadataRequest.new
|
1349
2430
|
|
1350
|
-
result =
|
2431
|
+
result = charges_controller.update_charge_metadata(charge_id, request)
|
1351
2432
|
|
1352
2433
|
```
|
1353
2434
|
|
1354
2435
|
|
1355
|
-
### <a name="
|
2436
|
+
### <a name="cancel_charge"></a> cancel_charge
|
1356
2437
|
|
1357
|
-
>
|
2438
|
+
> Cancel a charge
|
1358
2439
|
|
1359
2440
|
|
1360
2441
|
```ruby
|
1361
|
-
def
|
1362
|
-
|
2442
|
+
def cancel_charge(charge_id,
|
2443
|
+
request = nil); end
|
1363
2444
|
```
|
1364
2445
|
|
1365
2446
|
#### Parameters
|
1366
2447
|
|
1367
2448
|
| Parameter | Tags | Description |
|
1368
2449
|
|-----------|------|-------------|
|
1369
|
-
|
|
1370
|
-
|
|
2450
|
+
| charge_id | ``` Required ``` | Charge id |
|
2451
|
+
| request | ``` Optional ``` | Request for cancelling a charge |
|
1371
2452
|
|
1372
2453
|
|
1373
2454
|
#### Example Usage
|
1374
2455
|
|
1375
2456
|
```ruby
|
1376
|
-
|
1377
|
-
|
2457
|
+
charge_id = 'charge_id'
|
2458
|
+
request = CreateCancelChargeRequest.new
|
1378
2459
|
|
1379
|
-
result =
|
2460
|
+
result = charges_controller.cancel_charge(charge_id, request)
|
1380
2461
|
|
1381
2462
|
```
|
1382
2463
|
|
1383
2464
|
|
1384
|
-
### <a name="
|
2465
|
+
### <a name="capture_charge"></a> capture_charge
|
1385
2466
|
|
1386
|
-
>
|
2467
|
+
> Captures a charge
|
1387
2468
|
|
1388
2469
|
|
1389
2470
|
```ruby
|
1390
|
-
def
|
1391
|
-
|
2471
|
+
def capture_charge(charge_id,
|
2472
|
+
request = nil); end
|
1392
2473
|
```
|
1393
2474
|
|
1394
2475
|
#### Parameters
|
1395
2476
|
|
1396
2477
|
| Parameter | Tags | Description |
|
1397
2478
|
|-----------|------|-------------|
|
1398
|
-
|
|
1399
|
-
| request | ```
|
2479
|
+
| charge_id | ``` Required ``` | Charge id |
|
2480
|
+
| request | ``` Optional ``` | Request for capturing a charge |
|
1400
2481
|
|
1401
2482
|
|
1402
2483
|
#### Example Usage
|
1403
2484
|
|
1404
2485
|
```ruby
|
1405
|
-
|
1406
|
-
request =
|
2486
|
+
charge_id = 'charge_id'
|
2487
|
+
request = CreateCaptureChargeRequest.new
|
1407
2488
|
|
1408
|
-
result =
|
2489
|
+
result = charges_controller.capture_charge(charge_id, request)
|
1409
2490
|
|
1410
2491
|
```
|
1411
2492
|
|
1412
2493
|
|
1413
|
-
### <a name="
|
2494
|
+
### <a name="update_charge_due_date"></a> update_charge_due_date
|
1414
2495
|
|
1415
|
-
>
|
2496
|
+
> Updates the due date from a charge
|
1416
2497
|
|
1417
2498
|
|
1418
2499
|
```ruby
|
1419
|
-
def
|
1420
|
-
|
1421
|
-
name = nil,
|
1422
|
-
status = nil,
|
1423
|
-
billing_type = nil,
|
1424
|
-
created_since = nil,
|
1425
|
-
created_until = nil); end
|
2500
|
+
def update_charge_due_date(charge_id,
|
2501
|
+
request); end
|
1426
2502
|
```
|
1427
2503
|
|
1428
2504
|
#### Parameters
|
1429
2505
|
|
1430
2506
|
| Parameter | Tags | Description |
|
1431
2507
|
|-----------|------|-------------|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
| name | ``` Optional ``` | Filter for Plan's name |
|
1435
|
-
| status | ``` Optional ``` | Filter for Plan's status |
|
1436
|
-
| billing_type | ``` Optional ``` | Filter for plan's billing type |
|
1437
|
-
| created_since | ``` Optional ``` | Filter for plan's creation date start range |
|
1438
|
-
| created_until | ``` Optional ``` | Filter for plan's creation date end range |
|
2508
|
+
| charge_id | ``` Required ``` | Charge Id |
|
2509
|
+
| request | ``` Required ``` | Request for updating the due date |
|
1439
2510
|
|
1440
2511
|
|
1441
2512
|
#### Example Usage
|
1442
2513
|
|
1443
2514
|
```ruby
|
1444
|
-
|
1445
|
-
|
1446
|
-
name = 'name'
|
1447
|
-
status = 'status'
|
1448
|
-
billing_type = 'billing_type'
|
1449
|
-
created_since = DateTime.now
|
1450
|
-
created_until = DateTime.now
|
2515
|
+
charge_id = 'charge_id'
|
2516
|
+
request = UpdateChargeDueDateRequest.new
|
1451
2517
|
|
1452
|
-
result =
|
2518
|
+
result = charges_controller.update_charge_due_date(charge_id, request)
|
1453
2519
|
|
1454
2520
|
```
|
1455
2521
|
|
1456
2522
|
|
1457
2523
|
[Back to List of Controllers](#list_of_controllers)
|
1458
2524
|
|
1459
|
-
## <a name="
|
2525
|
+
## <a name="recipients_controller"></a> RecipientsController
|
1460
2526
|
|
1461
2527
|
### Get singleton instance
|
1462
2528
|
|
1463
|
-
The singleton instance of the ```
|
2529
|
+
The singleton instance of the ``` RecipientsController ``` class can be accessed from the API Client.
|
1464
2530
|
|
1465
2531
|
```ruby
|
1466
|
-
|
2532
|
+
recipients_controller = client.recipients
|
1467
2533
|
```
|
1468
2534
|
|
1469
|
-
### <a name="
|
2535
|
+
### <a name="update_recipient_metadata"></a> update_recipient_metadata
|
1470
2536
|
|
1471
|
-
> Updates
|
2537
|
+
> Updates recipient metadata
|
1472
2538
|
|
1473
2539
|
|
1474
2540
|
```ruby
|
1475
|
-
def
|
1476
|
-
|
1477
|
-
body); end
|
2541
|
+
def update_recipient_metadata(recipient_id,
|
2542
|
+
request); end
|
1478
2543
|
```
|
1479
2544
|
|
1480
2545
|
#### Parameters
|
1481
2546
|
|
1482
2547
|
| Parameter | Tags | Description |
|
1483
2548
|
|-----------|------|-------------|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
| body | ``` Required ``` | Request for updating a subscription item |
|
2549
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2550
|
+
| request | ``` Required ``` | Metadata |
|
1487
2551
|
|
1488
2552
|
|
1489
2553
|
#### Example Usage
|
1490
2554
|
|
1491
2555
|
```ruby
|
1492
|
-
|
1493
|
-
|
1494
|
-
body = UpdateSubscriptionItemRequest.new
|
2556
|
+
recipient_id = 'recipient_id'
|
2557
|
+
request = UpdateMetadataRequest.new
|
1495
2558
|
|
1496
|
-
result =
|
2559
|
+
result = recipients_controller.update_recipient_metadata(recipient_id, request)
|
1497
2560
|
|
1498
2561
|
```
|
1499
2562
|
|
1500
2563
|
|
1501
|
-
### <a name="
|
2564
|
+
### <a name="get_transfer"></a> get_transfer
|
1502
2565
|
|
1503
|
-
>
|
2566
|
+
> Gets a transfer
|
1504
2567
|
|
1505
2568
|
|
1506
2569
|
```ruby
|
1507
|
-
def
|
1508
|
-
|
1509
|
-
body); end
|
2570
|
+
def get_transfer(recipient_id,
|
2571
|
+
transfer_id); end
|
1510
2572
|
```
|
1511
2573
|
|
1512
2574
|
#### Parameters
|
1513
2575
|
|
1514
2576
|
| Parameter | Tags | Description |
|
1515
2577
|
|-----------|------|-------------|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
| body | ``` Required ``` | Request for creating a usage |
|
2578
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2579
|
+
| transfer_id | ``` Required ``` | Transfer id |
|
1519
2580
|
|
1520
2581
|
|
1521
2582
|
#### Example Usage
|
1522
2583
|
|
1523
2584
|
```ruby
|
1524
|
-
|
1525
|
-
|
1526
|
-
body = CreateUsageRequest.new
|
2585
|
+
recipient_id = 'recipient_id'
|
2586
|
+
transfer_id = 'transfer_id'
|
1527
2587
|
|
1528
|
-
result =
|
2588
|
+
result = recipients_controller.get_transfer(recipient_id, transfer_id)
|
1529
2589
|
|
1530
2590
|
```
|
1531
2591
|
|
1532
2592
|
|
1533
|
-
### <a name="
|
2593
|
+
### <a name="get_transfers"></a> get_transfers
|
1534
2594
|
|
1535
|
-
>
|
2595
|
+
> Gets a paginated list of transfers for the recipient
|
1536
2596
|
|
1537
2597
|
|
1538
2598
|
```ruby
|
1539
|
-
def
|
1540
|
-
|
2599
|
+
def get_transfers(recipient_id,
|
2600
|
+
page = nil,
|
2601
|
+
size = nil,
|
2602
|
+
status = nil,
|
2603
|
+
created_since = nil,
|
2604
|
+
created_until = nil); end
|
1541
2605
|
```
|
1542
2606
|
|
1543
2607
|
#### Parameters
|
1544
2608
|
|
1545
2609
|
| Parameter | Tags | Description |
|
1546
2610
|
|-----------|------|-------------|
|
1547
|
-
|
|
1548
|
-
|
|
2611
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2612
|
+
| page | ``` Optional ``` | Page number |
|
2613
|
+
| size | ``` Optional ``` | Page size |
|
2614
|
+
| status | ``` Optional ``` | Filter for transfer status |
|
2615
|
+
| created_since | ``` Optional ``` | Filter for start range of transfer creation date |
|
2616
|
+
| created_until | ``` Optional ``` | Filter for end range of transfer creation date |
|
1549
2617
|
|
1550
2618
|
|
1551
2619
|
#### Example Usage
|
1552
2620
|
|
1553
2621
|
```ruby
|
1554
|
-
|
1555
|
-
|
2622
|
+
recipient_id = 'recipient_id'
|
2623
|
+
page = 93
|
2624
|
+
size = 93
|
2625
|
+
status = 'status'
|
2626
|
+
created_since = DateTime.now
|
2627
|
+
created_until = DateTime.now
|
1556
2628
|
|
1557
|
-
result =
|
2629
|
+
result = recipients_controller.get_transfers(recipient_id, page, size, status, created_since, created_until)
|
1558
2630
|
|
1559
2631
|
```
|
1560
2632
|
|
1561
2633
|
|
1562
|
-
### <a name="
|
2634
|
+
### <a name="create_anticipation"></a> create_anticipation
|
1563
2635
|
|
1564
|
-
>
|
2636
|
+
> Creates an anticipation
|
1565
2637
|
|
1566
2638
|
|
1567
|
-
```ruby
|
1568
|
-
def
|
1569
|
-
|
2639
|
+
```ruby
|
2640
|
+
def create_anticipation(recipient_id,
|
2641
|
+
request); end
|
1570
2642
|
```
|
1571
2643
|
|
1572
2644
|
#### Parameters
|
1573
2645
|
|
1574
2646
|
| Parameter | Tags | Description |
|
1575
2647
|
|-----------|------|-------------|
|
1576
|
-
|
|
1577
|
-
| request | ``` Required ``` |
|
2648
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2649
|
+
| request | ``` Required ``` | Anticipation data |
|
1578
2650
|
|
1579
2651
|
|
1580
2652
|
#### Example Usage
|
1581
2653
|
|
1582
2654
|
```ruby
|
1583
|
-
|
1584
|
-
request =
|
2655
|
+
recipient_id = 'recipient_id'
|
2656
|
+
request = CreateAnticipationRequest.new
|
1585
2657
|
|
1586
|
-
result =
|
2658
|
+
result = recipients_controller.create_anticipation(recipient_id, request)
|
1587
2659
|
|
1588
2660
|
```
|
1589
2661
|
|
1590
2662
|
|
1591
|
-
### <a name="
|
2663
|
+
### <a name="get_anticipation"></a> get_anticipation
|
1592
2664
|
|
1593
|
-
>
|
2665
|
+
> Gets an anticipation
|
1594
2666
|
|
1595
2667
|
|
1596
2668
|
```ruby
|
1597
|
-
def
|
2669
|
+
def get_anticipation(recipient_id,
|
2670
|
+
anticipation_id); end
|
1598
2671
|
```
|
1599
2672
|
|
1600
2673
|
#### Parameters
|
1601
2674
|
|
1602
2675
|
| Parameter | Tags | Description |
|
1603
2676
|
|-----------|------|-------------|
|
1604
|
-
|
|
2677
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2678
|
+
| anticipation_id | ``` Required ``` | Anticipation id |
|
1605
2679
|
|
1606
2680
|
|
1607
2681
|
#### Example Usage
|
1608
2682
|
|
1609
2683
|
```ruby
|
1610
|
-
|
2684
|
+
recipient_id = 'recipient_id'
|
2685
|
+
anticipation_id = 'anticipation_id'
|
1611
2686
|
|
1612
|
-
result =
|
2687
|
+
result = recipients_controller.get_anticipation(recipient_id, anticipation_id)
|
1613
2688
|
|
1614
2689
|
```
|
1615
2690
|
|
1616
2691
|
|
1617
|
-
### <a name="
|
2692
|
+
### <a name="get_anticipation_limits"></a> get_anticipation_limits
|
1618
2693
|
|
1619
|
-
>
|
2694
|
+
> Gets the anticipation limits for a recipient
|
1620
2695
|
|
1621
2696
|
|
1622
2697
|
```ruby
|
1623
|
-
def
|
1624
|
-
|
2698
|
+
def get_anticipation_limits(recipient_id,
|
2699
|
+
timeframe,
|
2700
|
+
payment_date); end
|
1625
2701
|
```
|
1626
2702
|
|
1627
2703
|
#### Parameters
|
1628
2704
|
|
1629
2705
|
| Parameter | Tags | Description |
|
1630
2706
|
|-----------|------|-------------|
|
1631
|
-
|
|
1632
|
-
|
|
2707
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2708
|
+
| timeframe | ``` Required ``` | Timeframe |
|
2709
|
+
| payment_date | ``` Required ``` | Anticipation payment date |
|
1633
2710
|
|
1634
2711
|
|
1635
2712
|
#### Example Usage
|
1636
2713
|
|
1637
2714
|
```ruby
|
1638
|
-
|
1639
|
-
|
2715
|
+
recipient_id = 'recipient_id'
|
2716
|
+
timeframe = 'timeframe'
|
2717
|
+
payment_date = DateTime.now
|
1640
2718
|
|
1641
|
-
result =
|
2719
|
+
result = recipients_controller.get_anticipation_limits(recipient_id, timeframe, payment_date)
|
1642
2720
|
|
1643
2721
|
```
|
1644
2722
|
|
1645
2723
|
|
1646
|
-
### <a name="
|
2724
|
+
### <a name="get_anticipations"></a> get_anticipations
|
1647
2725
|
|
1648
|
-
>
|
2726
|
+
> Retrieves a paginated list of anticipations from a recipient
|
1649
2727
|
|
1650
2728
|
|
1651
2729
|
```ruby
|
1652
|
-
def
|
1653
|
-
|
2730
|
+
def get_anticipations(recipient_id,
|
2731
|
+
page = nil,
|
2732
|
+
size = nil,
|
2733
|
+
status = nil,
|
2734
|
+
timeframe = nil,
|
2735
|
+
payment_date_since = nil,
|
2736
|
+
payment_date_until = nil,
|
2737
|
+
created_since = nil,
|
2738
|
+
created_until = nil); end
|
1654
2739
|
```
|
1655
2740
|
|
1656
2741
|
#### Parameters
|
1657
2742
|
|
1658
2743
|
| Parameter | Tags | Description |
|
1659
2744
|
|-----------|------|-------------|
|
1660
|
-
|
|
1661
|
-
|
|
2745
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2746
|
+
| page | ``` Optional ``` | Page number |
|
2747
|
+
| size | ``` Optional ``` | Page size |
|
2748
|
+
| status | ``` Optional ``` | Filter for anticipation status |
|
2749
|
+
| timeframe | ``` Optional ``` | Filter for anticipation timeframe |
|
2750
|
+
| payment_date_since | ``` Optional ``` | Filter for start range for anticipation payment date |
|
2751
|
+
| payment_date_until | ``` Optional ``` | Filter for end range for anticipation payment date |
|
2752
|
+
| created_since | ``` Optional ``` | Filter for start range for anticipation creation date |
|
2753
|
+
| created_until | ``` Optional ``` | Filter for end range for anticipation creation date |
|
1662
2754
|
|
1663
2755
|
|
1664
2756
|
#### Example Usage
|
1665
2757
|
|
1666
2758
|
```ruby
|
1667
|
-
|
1668
|
-
|
2759
|
+
recipient_id = 'recipient_id'
|
2760
|
+
page = 184
|
2761
|
+
size = 184
|
2762
|
+
status = 'status'
|
2763
|
+
timeframe = 'timeframe'
|
2764
|
+
payment_date_since = DateTime.now
|
2765
|
+
payment_date_until = DateTime.now
|
2766
|
+
created_since = DateTime.now
|
2767
|
+
created_until = DateTime.now
|
1669
2768
|
|
1670
|
-
result =
|
2769
|
+
result = recipients_controller.get_anticipations(recipient_id, page, size, status, timeframe, payment_date_since, payment_date_until, created_since, created_until)
|
1671
2770
|
|
1672
2771
|
```
|
1673
2772
|
|
1674
2773
|
|
1675
|
-
### <a name="
|
2774
|
+
### <a name="update_recipient"></a> update_recipient
|
1676
2775
|
|
1677
|
-
>
|
2776
|
+
> Updates a recipient
|
1678
2777
|
|
1679
2778
|
|
1680
2779
|
```ruby
|
1681
|
-
def
|
2780
|
+
def update_recipient(recipient_id,
|
2781
|
+
request); end
|
1682
2782
|
```
|
1683
2783
|
|
1684
2784
|
#### Parameters
|
1685
2785
|
|
1686
2786
|
| Parameter | Tags | Description |
|
1687
2787
|
|-----------|------|-------------|
|
1688
|
-
|
|
2788
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2789
|
+
| request | ``` Required ``` | Recipient data |
|
1689
2790
|
|
1690
2791
|
|
1691
2792
|
#### Example Usage
|
1692
2793
|
|
1693
2794
|
```ruby
|
1694
|
-
|
2795
|
+
recipient_id = 'recipient_id'
|
2796
|
+
request = UpdateRecipientRequest.new
|
1695
2797
|
|
1696
|
-
result =
|
2798
|
+
result = recipients_controller.update_recipient(recipient_id, request)
|
1697
2799
|
|
1698
2800
|
```
|
1699
2801
|
|
1700
2802
|
|
1701
|
-
### <a name="
|
2803
|
+
### <a name="update_recipient_default_bank_account"></a> update_recipient_default_bank_account
|
1702
2804
|
|
1703
|
-
> Updates the
|
2805
|
+
> Updates the default bank account from a recipient
|
1704
2806
|
|
1705
2807
|
|
1706
2808
|
```ruby
|
1707
|
-
def
|
1708
|
-
|
2809
|
+
def update_recipient_default_bank_account(recipient_id,
|
2810
|
+
request); end
|
1709
2811
|
```
|
1710
2812
|
|
1711
2813
|
#### Parameters
|
1712
2814
|
|
1713
2815
|
| Parameter | Tags | Description |
|
1714
2816
|
|-----------|------|-------------|
|
1715
|
-
|
|
1716
|
-
| request | ``` Required ``` |
|
2817
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
2818
|
+
| request | ``` Required ``` | Bank account data |
|
1717
2819
|
|
1718
2820
|
|
1719
2821
|
#### Example Usage
|
1720
2822
|
|
1721
2823
|
```ruby
|
1722
|
-
|
1723
|
-
request =
|
2824
|
+
recipient_id = 'recipient_id'
|
2825
|
+
request = UpdateRecipientBankAccountRequest.new
|
1724
2826
|
|
1725
|
-
result =
|
2827
|
+
result = recipients_controller.update_recipient_default_bank_account(recipient_id, request)
|
1726
2828
|
|
1727
2829
|
```
|
1728
2830
|
|
1729
2831
|
|
1730
|
-
### <a name="
|
2832
|
+
### <a name="get_recipient"></a> get_recipient
|
1731
2833
|
|
1732
|
-
>
|
2834
|
+
> Retrieves recipient information
|
1733
2835
|
|
1734
2836
|
|
1735
2837
|
```ruby
|
1736
|
-
def
|
1737
|
-
discount_id); end
|
2838
|
+
def get_recipient(recipient_id); end
|
1738
2839
|
```
|
1739
2840
|
|
1740
2841
|
#### Parameters
|
1741
2842
|
|
1742
2843
|
| Parameter | Tags | Description |
|
1743
2844
|
|-----------|------|-------------|
|
1744
|
-
|
|
1745
|
-
| discount_id | ``` Required ``` | Discount Id |
|
2845
|
+
| recipient_id | ``` Required ``` | Recipiend id |
|
1746
2846
|
|
1747
2847
|
|
1748
2848
|
#### Example Usage
|
1749
2849
|
|
1750
2850
|
```ruby
|
1751
|
-
|
1752
|
-
discount_id = 'discount_id'
|
2851
|
+
recipient_id = 'recipient_id'
|
1753
2852
|
|
1754
|
-
result =
|
2853
|
+
result = recipients_controller.get_recipient(recipient_id)
|
1755
2854
|
|
1756
2855
|
```
|
1757
2856
|
|
1758
2857
|
|
1759
|
-
### <a name="
|
2858
|
+
### <a name="get_recipients"></a> get_recipients
|
1760
2859
|
|
1761
|
-
>
|
2860
|
+
> Retrieves paginated recipients information
|
1762
2861
|
|
1763
2862
|
|
1764
2863
|
```ruby
|
1765
|
-
def
|
1766
|
-
|
2864
|
+
def get_recipients(page = nil,
|
2865
|
+
size = nil); end
|
1767
2866
|
```
|
1768
2867
|
|
1769
2868
|
#### Parameters
|
1770
2869
|
|
1771
2870
|
| Parameter | Tags | Description |
|
1772
2871
|
|-----------|------|-------------|
|
1773
|
-
|
|
1774
|
-
|
|
2872
|
+
| page | ``` Optional ``` | Page number |
|
2873
|
+
| size | ``` Optional ``` | Page size |
|
1775
2874
|
|
1776
2875
|
|
1777
2876
|
#### Example Usage
|
1778
2877
|
|
1779
2878
|
```ruby
|
1780
|
-
|
1781
|
-
|
2879
|
+
page = 184
|
2880
|
+
size = 184
|
1782
2881
|
|
1783
|
-
result =
|
2882
|
+
result = recipients_controller.get_recipients(page, size)
|
1784
2883
|
|
1785
2884
|
```
|
1786
2885
|
|
1787
2886
|
|
1788
|
-
### <a name="
|
2887
|
+
### <a name="get_balance"></a> get_balance
|
1789
2888
|
|
1790
|
-
>
|
2889
|
+
> Get balance information for a recipient
|
1791
2890
|
|
1792
2891
|
|
1793
2892
|
```ruby
|
1794
|
-
def
|
1795
|
-
subscription_item_id); end
|
2893
|
+
def get_balance(recipient_id); end
|
1796
2894
|
```
|
1797
2895
|
|
1798
2896
|
#### Parameters
|
1799
2897
|
|
1800
2898
|
| Parameter | Tags | Description |
|
1801
2899
|
|-----------|------|-------------|
|
1802
|
-
|
|
1803
|
-
| subscription_item_id | ``` Required ``` | Subscription item id |
|
2900
|
+
| recipient_id | ``` Required ``` | Recipient id |
|
1804
2901
|
|
1805
2902
|
|
1806
2903
|
#### Example Usage
|
1807
2904
|
|
1808
2905
|
```ruby
|
1809
|
-
|
1810
|
-
subscription_item_id = 'subscription_item_id'
|
2906
|
+
recipient_id = 'recipient_id'
|
1811
2907
|
|
1812
|
-
result =
|
2908
|
+
result = recipients_controller.get_balance(recipient_id)
|
1813
2909
|
|
1814
2910
|
```
|
1815
2911
|
|
1816
2912
|
|
1817
|
-
### <a name="
|
2913
|
+
### <a name="create_transfer"></a> create_transfer
|
1818
2914
|
|
1819
|
-
>
|
2915
|
+
> Creates a transfer for a recipient
|
1820
2916
|
|
1821
2917
|
|
1822
2918
|
```ruby
|
1823
|
-
def
|
1824
|
-
|
1825
|
-
usage_id); end
|
2919
|
+
def create_transfer(recipient_id,
|
2920
|
+
request); end
|
1826
2921
|
```
|
1827
2922
|
|
1828
2923
|
#### Parameters
|
1829
2924
|
|
1830
2925
|
| Parameter | Tags | Description |
|
1831
2926
|
|-----------|------|-------------|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
| usage_id | ``` Required ``` | The usage id |
|
2927
|
+
| recipient_id | ``` Required ``` | Recipient Id |
|
2928
|
+
| request | ``` Required ``` | Transfer data |
|
1835
2929
|
|
1836
2930
|
|
1837
2931
|
#### Example Usage
|
1838
2932
|
|
1839
2933
|
```ruby
|
1840
|
-
|
1841
|
-
|
1842
|
-
usage_id = 'usage_id'
|
2934
|
+
recipient_id = 'recipient_id'
|
2935
|
+
request = CreateTransferRequest.new
|
1843
2936
|
|
1844
|
-
result =
|
2937
|
+
result = recipients_controller.create_transfer(recipient_id, request)
|
1845
2938
|
|
1846
2939
|
```
|
1847
2940
|
|
1848
2941
|
|
1849
|
-
### <a name="
|
2942
|
+
### <a name="create_recipient"></a> create_recipient
|
1850
2943
|
|
1851
|
-
>
|
2944
|
+
> Creates a new recipient
|
1852
2945
|
|
1853
2946
|
|
1854
2947
|
```ruby
|
1855
|
-
def
|
1856
|
-
item_id,
|
1857
|
-
page = nil,
|
1858
|
-
size = nil); end
|
2948
|
+
def create_recipient(request); end
|
1859
2949
|
```
|
1860
2950
|
|
1861
2951
|
#### Parameters
|
1862
2952
|
|
1863
2953
|
| Parameter | Tags | Description |
|
1864
2954
|
|-----------|------|-------------|
|
1865
|
-
|
|
1866
|
-
| item_id | ``` Required ``` | The subscription item id |
|
1867
|
-
| page | ``` Optional ``` | Page number |
|
1868
|
-
| size | ``` Optional ``` | Page size |
|
2955
|
+
| request | ``` Required ``` | Recipient data |
|
1869
2956
|
|
1870
2957
|
|
1871
2958
|
#### Example Usage
|
1872
2959
|
|
1873
2960
|
```ruby
|
1874
|
-
|
1875
|
-
item_id = 'item_id'
|
1876
|
-
page = 110
|
1877
|
-
size = 110
|
2961
|
+
request = CreateRecipientRequest.new
|
1878
2962
|
|
1879
|
-
result =
|
2963
|
+
result = recipients_controller.create_recipient(request)
|
1880
2964
|
|
1881
2965
|
```
|
1882
2966
|
|
1883
2967
|
|
1884
|
-
|
2968
|
+
[Back to List of Controllers](#list_of_controllers)
|
1885
2969
|
|
1886
|
-
|
2970
|
+
## <a name="tokens_controller"></a> TokensController
|
2971
|
+
|
2972
|
+
### Get singleton instance
|
1887
2973
|
|
2974
|
+
The singleton instance of the ``` TokensController ``` class can be accessed from the API Client.
|
1888
2975
|
|
1889
2976
|
```ruby
|
1890
|
-
|
1891
|
-
|
2977
|
+
tokens_controller = client.tokens
|
2978
|
+
```
|
2979
|
+
|
2980
|
+
### <a name="get_token"></a> get_token
|
2981
|
+
|
2982
|
+
> *Tags:* ``` Skips Authentication ```
|
2983
|
+
|
2984
|
+
> Gets a token from its id
|
2985
|
+
|
2986
|
+
|
2987
|
+
```ruby
|
2988
|
+
def get_token(id,
|
2989
|
+
public_key); end
|
1892
2990
|
```
|
1893
2991
|
|
1894
2992
|
#### Parameters
|
1895
2993
|
|
1896
2994
|
| Parameter | Tags | Description |
|
1897
2995
|
|-----------|------|-------------|
|
1898
|
-
|
|
1899
|
-
|
|
2996
|
+
| id | ``` Required ``` | Token id |
|
2997
|
+
| public_key | ``` Required ``` | Public key |
|
1900
2998
|
|
1901
2999
|
|
1902
3000
|
#### Example Usage
|
1903
3001
|
|
1904
3002
|
```ruby
|
1905
|
-
|
1906
|
-
|
3003
|
+
id = 'id'
|
3004
|
+
public_key = 'public_key'
|
1907
3005
|
|
1908
|
-
result =
|
3006
|
+
result = tokens_controller.get_token(id, public_key)
|
1909
3007
|
|
1910
3008
|
```
|
1911
3009
|
|
1912
3010
|
|
1913
|
-
### <a name="
|
3011
|
+
### <a name="create_token"></a> create_token
|
1914
3012
|
|
1915
|
-
>
|
3013
|
+
> *Tags:* ``` Skips Authentication ```
|
3014
|
+
|
3015
|
+
> TODO: Add a method description
|
1916
3016
|
|
1917
3017
|
|
1918
3018
|
```ruby
|
1919
|
-
def
|
1920
|
-
|
1921
|
-
code = nil,
|
1922
|
-
billing_type = nil,
|
1923
|
-
customer_id = nil,
|
1924
|
-
plan_id = nil,
|
1925
|
-
card_id = nil,
|
1926
|
-
status = nil,
|
1927
|
-
next_billing_since = nil,
|
1928
|
-
next_billing_until = nil,
|
1929
|
-
created_since = nil,
|
1930
|
-
created_until = nil); end
|
3019
|
+
def create_token(public_key,
|
3020
|
+
request); end
|
1931
3021
|
```
|
1932
3022
|
|
1933
3023
|
#### Parameters
|
1934
3024
|
|
1935
3025
|
| Parameter | Tags | Description |
|
1936
3026
|
|-----------|------|-------------|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
| code | ``` Optional ``` | Filter for subscription's code |
|
1940
|
-
| billing_type | ``` Optional ``` | Filter for subscription's billing type |
|
1941
|
-
| customer_id | ``` Optional ``` | Filter for subscription's customer id |
|
1942
|
-
| plan_id | ``` Optional ``` | Filter for subscription's plan id |
|
1943
|
-
| card_id | ``` Optional ``` | Filter for subscription's card id |
|
1944
|
-
| status | ``` Optional ``` | Filter for subscription's status |
|
1945
|
-
| next_billing_since | ``` Optional ``` | Filter for subscription's next billing date start range |
|
1946
|
-
| next_billing_until | ``` Optional ``` | Filter for subscription's next billing date end range |
|
1947
|
-
| created_since | ``` Optional ``` | Filter for subscription's creation date start range |
|
1948
|
-
| created_until | ``` Optional ``` | Filter for subscriptions creation date end range |
|
3027
|
+
| public_key | ``` Required ``` | Public key |
|
3028
|
+
| request | ``` Required ``` | Request for creating a token |
|
1949
3029
|
|
1950
3030
|
|
1951
3031
|
#### Example Usage
|
1952
3032
|
|
1953
3033
|
```ruby
|
1954
|
-
|
1955
|
-
|
1956
|
-
code = 'code'
|
1957
|
-
billing_type = 'billing_type'
|
1958
|
-
customer_id = 'customer_id'
|
1959
|
-
plan_id = 'plan_id'
|
1960
|
-
card_id = 'card_id'
|
1961
|
-
status = 'status'
|
1962
|
-
next_billing_since = DateTime.now
|
1963
|
-
next_billing_until = DateTime.now
|
1964
|
-
created_since = DateTime.now
|
1965
|
-
created_until = DateTime.now
|
3034
|
+
public_key = 'public_key'
|
3035
|
+
request = CreateTokenRequest.new
|
1966
3036
|
|
1967
|
-
result =
|
3037
|
+
result = tokens_controller.create_token(public_key, request)
|
1968
3038
|
|
1969
3039
|
```
|
1970
3040
|
|
1971
3041
|
|
1972
3042
|
[Back to List of Controllers](#list_of_controllers)
|
1973
3043
|
|
1974
|
-
## <a name="
|
3044
|
+
## <a name="sellers_controller"></a> SellersController
|
1975
3045
|
|
1976
3046
|
### Get singleton instance
|
1977
3047
|
|
1978
|
-
The singleton instance of the ```
|
3048
|
+
The singleton instance of the ``` SellersController ``` class can be accessed from the API Client.
|
1979
3049
|
|
1980
3050
|
```ruby
|
1981
|
-
|
3051
|
+
sellers_controller = client.sellers
|
1982
3052
|
```
|
1983
3053
|
|
1984
|
-
### <a name="
|
3054
|
+
### <a name="get_seller_by_id"></a> get_seller_by_id
|
1985
3055
|
|
1986
|
-
>
|
3056
|
+
> TODO: Add a method description
|
1987
3057
|
|
1988
3058
|
|
1989
3059
|
```ruby
|
1990
|
-
def
|
3060
|
+
def get_seller_by_id(id); end
|
1991
3061
|
```
|
1992
3062
|
|
1993
3063
|
#### Parameters
|
1994
3064
|
|
1995
3065
|
| Parameter | Tags | Description |
|
1996
3066
|
|-----------|------|-------------|
|
1997
|
-
|
|
3067
|
+
| id | ``` Required ``` | Seller Id |
|
1998
3068
|
|
1999
3069
|
|
2000
3070
|
#### Example Usage
|
2001
3071
|
|
2002
3072
|
```ruby
|
2003
|
-
|
3073
|
+
id = 'id'
|
2004
3074
|
|
2005
|
-
result =
|
3075
|
+
result = sellers_controller.get_seller_by_id(id)
|
2006
3076
|
|
2007
3077
|
```
|
2008
3078
|
|
2009
3079
|
|
2010
|
-
### <a name="
|
3080
|
+
### <a name="delete_seller"></a> delete_seller
|
2011
3081
|
|
2012
|
-
>
|
3082
|
+
> TODO: Add a method description
|
2013
3083
|
|
2014
3084
|
|
2015
3085
|
```ruby
|
2016
|
-
def
|
3086
|
+
def delete_seller(seller_id); end
|
2017
3087
|
```
|
2018
3088
|
|
2019
3089
|
#### Parameters
|
2020
3090
|
|
2021
3091
|
| Parameter | Tags | Description |
|
2022
3092
|
|-----------|------|-------------|
|
2023
|
-
|
|
3093
|
+
| seller_id | ``` Required ``` | Seller Id |
|
2024
3094
|
|
2025
3095
|
|
2026
3096
|
#### Example Usage
|
2027
3097
|
|
2028
3098
|
```ruby
|
2029
|
-
|
3099
|
+
seller_id = 'sellerId'
|
2030
3100
|
|
2031
|
-
result =
|
3101
|
+
result = sellers_controller.delete_seller(seller_id)
|
2032
3102
|
|
2033
3103
|
```
|
2034
3104
|
|
2035
3105
|
|
2036
|
-
### <a name="
|
3106
|
+
### <a name="create_seller"></a> create_seller
|
2037
3107
|
|
2038
|
-
>
|
3108
|
+
> TODO: Add a method description
|
2039
3109
|
|
2040
3110
|
|
2041
3111
|
```ruby
|
2042
|
-
def
|
2043
|
-
request); end
|
3112
|
+
def create_seller(request); end
|
2044
3113
|
```
|
2045
3114
|
|
2046
3115
|
#### Parameters
|
2047
3116
|
|
2048
3117
|
| Parameter | Tags | Description |
|
2049
3118
|
|-----------|------|-------------|
|
2050
|
-
|
|
2051
|
-
| request | ``` Required ``` | Request for updating the order metadata |
|
3119
|
+
| request | ``` Required ``` | Seller Model |
|
2052
3120
|
|
2053
3121
|
|
2054
3122
|
#### Example Usage
|
2055
3123
|
|
2056
3124
|
```ruby
|
2057
|
-
|
2058
|
-
request = UpdateMetadataRequest.new
|
3125
|
+
request = CreateSellerRequest.new
|
2059
3126
|
|
2060
|
-
result =
|
3127
|
+
result = sellers_controller.create_seller(request)
|
2061
3128
|
|
2062
3129
|
```
|
2063
3130
|
|
2064
3131
|
|
2065
|
-
### <a name="
|
3132
|
+
### <a name="get_sellers"></a> get_sellers
|
2066
3133
|
|
2067
|
-
>
|
3134
|
+
> TODO: Add a method description
|
2068
3135
|
|
2069
3136
|
|
2070
3137
|
```ruby
|
2071
|
-
def
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
3138
|
+
def get_sellers(page = nil,
|
3139
|
+
size = nil,
|
3140
|
+
name = nil,
|
3141
|
+
document = nil,
|
3142
|
+
code = nil,
|
3143
|
+
status = nil,
|
3144
|
+
type = nil,
|
3145
|
+
created_since = nil,
|
3146
|
+
created_until = nil); end
|
2078
3147
|
```
|
2079
3148
|
|
2080
3149
|
#### Parameters
|
@@ -2083,99 +3152,87 @@ def get_orders(page = nil,
|
|
2083
3152
|
|-----------|------|-------------|
|
2084
3153
|
| page | ``` Optional ``` | Page number |
|
2085
3154
|
| size | ``` Optional ``` | Page size |
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
3155
|
+
| name | ``` Optional ``` | TODO: Add a parameter description |
|
3156
|
+
| document | ``` Optional ``` | TODO: Add a parameter description |
|
3157
|
+
| code | ``` Optional ``` | TODO: Add a parameter description |
|
3158
|
+
| status | ``` Optional ``` | TODO: Add a parameter description |
|
3159
|
+
| type | ``` Optional ``` | TODO: Add a parameter description |
|
3160
|
+
| created_since | ``` Optional ``` | TODO: Add a parameter description |
|
3161
|
+
| created_until | ``` Optional ``` | TODO: Add a parameter description |
|
2091
3162
|
|
2092
3163
|
|
2093
3164
|
#### Example Usage
|
2094
3165
|
|
2095
3166
|
```ruby
|
2096
|
-
page =
|
2097
|
-
size =
|
3167
|
+
page = 184
|
3168
|
+
size = 184
|
3169
|
+
name = 'name'
|
3170
|
+
document = 'document'
|
2098
3171
|
code = 'code'
|
2099
3172
|
status = 'status'
|
3173
|
+
type = 'type'
|
2100
3174
|
created_since = DateTime.now
|
2101
3175
|
created_until = DateTime.now
|
2102
|
-
customer_id = 'customer_id'
|
2103
|
-
|
2104
|
-
result = orders.get_orders(page, size, code, status, created_since, created_until, customer_id)
|
2105
3176
|
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
[Back to List of Controllers](#list_of_controllers)
|
2110
|
-
|
2111
|
-
## <a name="tokens_controller"></a> TokensController
|
2112
|
-
|
2113
|
-
### Get singleton instance
|
3177
|
+
result = sellers_controller.get_sellers(page, size, name, document, code, status, type, created_since, created_until)
|
2114
3178
|
|
2115
|
-
The singleton instance of the ``` TokensController ``` class can be accessed from the API Client.
|
2116
|
-
|
2117
|
-
```ruby
|
2118
|
-
tokens = client.tokens
|
2119
3179
|
```
|
2120
3180
|
|
2121
|
-
### <a name="get_token"></a> get_token
|
2122
3181
|
|
2123
|
-
|
3182
|
+
### <a name="update_seller"></a> update_seller
|
2124
3183
|
|
2125
|
-
>
|
3184
|
+
> TODO: Add a method description
|
2126
3185
|
|
2127
3186
|
|
2128
3187
|
```ruby
|
2129
|
-
def
|
2130
|
-
|
3188
|
+
def update_seller(id,
|
3189
|
+
request); end
|
2131
3190
|
```
|
2132
3191
|
|
2133
3192
|
#### Parameters
|
2134
3193
|
|
2135
3194
|
| Parameter | Tags | Description |
|
2136
3195
|
|-----------|------|-------------|
|
2137
|
-
| id | ``` Required ``` |
|
2138
|
-
|
|
3196
|
+
| id | ``` Required ``` | TODO: Add a parameter description |
|
3197
|
+
| request | ``` Required ``` | Update Seller model |
|
2139
3198
|
|
2140
3199
|
|
2141
3200
|
#### Example Usage
|
2142
3201
|
|
2143
3202
|
```ruby
|
2144
3203
|
id = 'id'
|
2145
|
-
|
3204
|
+
request = UpdateSellerRequest.new
|
2146
3205
|
|
2147
|
-
result =
|
3206
|
+
result = sellers_controller.update_seller(id, request)
|
2148
3207
|
|
2149
3208
|
```
|
2150
3209
|
|
2151
3210
|
|
2152
|
-
### <a name="
|
2153
|
-
|
2154
|
-
> *Tags:* ``` Skips Authentication ```
|
3211
|
+
### <a name="update_seller_metadata"></a> update_seller_metadata
|
2155
3212
|
|
2156
3213
|
> TODO: Add a method description
|
2157
3214
|
|
2158
3215
|
|
2159
3216
|
```ruby
|
2160
|
-
def
|
2161
|
-
|
3217
|
+
def update_seller_metadata(seller_id,
|
3218
|
+
request); end
|
2162
3219
|
```
|
2163
3220
|
|
2164
3221
|
#### Parameters
|
2165
3222
|
|
2166
3223
|
| Parameter | Tags | Description |
|
2167
3224
|
|-----------|------|-------------|
|
2168
|
-
|
|
2169
|
-
| request | ``` Required ``` | Request for
|
3225
|
+
| seller_id | ``` Required ``` | Seller Id |
|
3226
|
+
| request | ``` Required ``` | Request for updating the charge metadata |
|
2170
3227
|
|
2171
3228
|
|
2172
3229
|
#### Example Usage
|
2173
3230
|
|
2174
3231
|
```ruby
|
2175
|
-
|
2176
|
-
request =
|
3232
|
+
seller_id = 'seller_id'
|
3233
|
+
request = UpdateMetadataRequest.new
|
2177
3234
|
|
2178
|
-
result =
|
3235
|
+
result = sellers_controller.update_seller_metadata(seller_id, request)
|
2179
3236
|
|
2180
3237
|
```
|
2181
3238
|
|