pr-pin 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f32e8eefb471ea647f6268f379cd63a07525430f00bfc1a6e5f88e1988314ac
4
- data.tar.gz: ea49d8cb25bb42d26d50a1efc8f05a085acbe8aa17feeae5c3b3ff18577d3f71
3
+ metadata.gz: c5c46e7b7fb9f7caf1043adf2acb0d7d65d361dd1a92eb94ab6a883ca038c2c2
4
+ data.tar.gz: 247e327a750a9502459c5cf9d79f893eccded38bb092c8338de84ee4e238163f
5
5
  SHA512:
6
- metadata.gz: 503d6ef1300c1562bf88392cc886e75e714c389e1299320867be5ad7ade12b406aa3a051ddaf2c83e6ef232cb90fd9b59e83676318514fde1b5d12e1de922937
7
- data.tar.gz: 3d6682b40e28aba0cd5e219dafc5c00d0f6dc30ae6d3535e6efbf73facaf4d7681db3ee069c6f435dc4e2e2c0e39801a214d73620d5192002e4b4a85f25909a1
6
+ metadata.gz: 9fe319516a83e0034ab58cb27e050e442767ddef0edba2afbac269fbaac2c66e9444604f3bccfeac8dfa4522b9faf96c75d849dc30e3d8baea530b3397218107
7
+ data.tar.gz: c05ca50f8ab613b86f97b294da0dc73b0b2a02fa077385cb422d0f826edb1e89ea7975fc3ed3fe72998cfa7886a20ee44850c85b2bfc32b8352bf7c13c541605
data/README.md CHANGED
@@ -141,61 +141,61 @@ Coverage of https://pinpayments.com/developers/api-reference
141
141
 
142
142
  | Relation | Endpoint | Description | Docs | Implemented |
143
143
  |--|--|--|--|--|
144
- | Balance | GET /balance | Returns the current balance of your Pin Payments account | [:link:](https://pinpayments.com/developers/api-reference/balance) | :x: |
145
- | Bank Accounts | POST /bank_accounts | Creates a bank account token | [:link:](https://pinpayments.com/developers/api-reference/bank-accounts) | :x: |
146
- | Cards | POST /cards | Securely stores a card's details | [:link:](https://pinpayments.com/developers/api-reference/cards) | :x: |
147
- | Charges | POST /charges | Creates a new charge | [:link:](https://pinpayments.com/developers/api-reference/charges#post-charges) | :heavy_check_mark: |
148
- | Charges | PUT /charges/charge-token/capture | Captures a previously authorised charge | [:link:](https://pinpayments.com/developers/api-reference/charges#put-charges) | :x: |
149
- | Charges | GET /charges | Returns a paginated list of all charges | [:link:](https://pinpayments.com/developers/api-reference/charges#get-charges) | :heavy_check_mark: |
150
- | Charges | GET /charges/search | Returns a paginated list of charges matching the search criteria | [:link:](https://pinpayments.com/developers/api-reference/charges#search-charges) | :heavy_check_mark: |
151
- | Charges | GET /charges/charge-token | Returns the details of a charge | [:link:](https://pinpayments.com/developers/api-reference/charges#get-charge) | :heavy_check_mark: |
152
- | Customers | POST /customers | Creates a new customer | [:link:](https://pinpayments.com/developers/api-reference/customers#post-customers) | :heavy_check_mark: |
153
- | Customers | GET /customers | Returns a paginated list of all customers | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers) | :heavy_check_mark: |
154
- | Customers | GET /customers/customer-token | Returns the details of a customer | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customer) | :heavy_check_mark: |
155
- | Customers | PUT /customers/customer-token | Updates the details of a customer | [:link:](https://pinpayments.com/developers/api-reference/customers#put-customer) | :heavy_check_mark: |
156
- | Customers | DELETE /customers/customer-token | Deletes a customer and all of its cards | [:link:](https://pinpayments.com/developers/api-reference/customers#delete-customer) | :x: |
157
- | Customers | GET /customers/customer-token/charges | Returns a paginated list of a customer's charges | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers-charges) | :x: |
158
- | Customers | GET /customers/customer-token/cards | Returns a paginated list of a customer's cards | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers-cards) | :x: |
159
- | Customers | POST /customers/customer-token/cards | Creates an additional card for the specified customer | [:link:](https://pinpayments.com/developers/api-reference/customers#post-customers-cards) | :x: |
160
- | Customers | DELETE /customers/customer-token/cards/card-token | Deletes a customer's non-primary card | [:link:](https://pinpayments.com/developers/api-reference/customers#delete-customers-card) | :x: |
161
- | Customers | GET /customers/customer-token/subscriptions | Retrieves the specified customer's subscriptions | [:link:](https://pinpayments.com/developers/api-reference/customers#customers-subscriptions) | :x: |
162
- | Events | GET /events | Returns a paginated list of all events | [:link:](https://pinpayments.com/developers/api-reference/events#get-events) | :x: |
163
- | Events | GET /events/event-token | Returns the details of the specified event | [:link:](https://pinpayments.com/developers/api-reference/events#get-event) | :x: |
164
- | Plans | POST /plans | Creates a new plan | [:link:](https://pinpayments.com/developers/api-reference/plans#post-plans) | :heavy_check_mark: |
165
- | Plans | GET /plans | Returns a paginated list of all plans | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plans) | :heavy_check_mark: |
166
- | Plans | GET /plans/plan-token | Returns the details of a specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plan) | :heavy_check_mark: |
167
- | Plans | PUT /plans/plan-token | Update the specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#put-plan) | :heavy_check_mark: |
168
- | Plans | DELETE /plans/plan-token | Deletes a plan and all of its subscriptions | [:link:](https://pinpayments.com/developers/api-reference/plans#delete-plan) | :x: |
169
- | Plans | POST /plans/plan-token/subscriptions | Creates a new subscription to the specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#create-plan-subscription) | :x: |
170
- | Plans | GET /plans/plan-token/subscriptions | Returns a paginated list of subscriptions for a plan | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plan-subscriptions) | :x: |
171
- | Subscriptions | POST /subscriptions | Activate a new subscription and returns its details | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#post-subscriptions) | :heavy_check_mark: |
172
- | Subscriptions | GET /subscriptions | Returns a paginated list of all subscriptions | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#get-subscriptions) | :heavy_check_mark: |
173
- | Subscriptions | GET /subscriptions/sub-token | Returns the details of the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#get-subscription) | :heavy_check_mark: |
174
- | Subscriptions | PUT /subscriptions/sub-token | Updates the card associated with a subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#update-subscription) | :heavy_check_mark: |
175
- | Subscriptions | DELETE /subscriptions/sub-token | Cancels the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#delete-subscription) | :x: |
176
- | Subscriptions | PUT /subscriptions/sub-token/reactivate | Reactivates the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#reactivate-subscription) | :x: |
177
- | Subscriptions | GET /subscriptions/sub-token/ledger | Fetch the ledger entries relating to a subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#ledger-subscription) | :heavy_check_mark: |
178
- | Recipients | POST /recipients | Creates a new recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#post-recipients) | :x: |
179
- | Recipients | GET /recipients | Returns a paginated list of all recipients | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipients) | :x: |
180
- | Recipients | GET /recipients/recipient-token | Returns the details of a recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipient) | :x: |
181
- | Recipients | PUT /recipients/recipient-token | Updates the details of a recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#put-recipient) | :x: |
182
- | Recipients | GET /recipients/recipient-token/transfers | Returns a paginated list of a recipient's transfers | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipients-transfers) | :x: |
183
- | Refunds | GET /refunds | Returns a paginated list of all refunds | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-refunds) | :heavy_check_mark: |
184
- | Refunds | GET /refunds/refund-token | Returns the details of the specified refund | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-refund) | :heavy_check_mark: |
185
- | Refunds | POST /charges/charge-token/refunds | Creates a new refund and returns its details | [:link:](https://pinpayments.com/developers/api-reference/refunds#post-refunds) | :heavy_check_mark: |
186
- | Refunds | GET /charges/charge-token/refunds | Returns a list of all refunds for the specified charge | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-token-refunds) | :heavy_check_mark: |
187
- | Transfers | POST /transfers | Creates a new transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#post-transfers) | :x: |
188
- | Transfers | GET /transfers | Returns a paginated list of all transfers | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfers) | :x: |
189
- | Transfers | GET /transfers/search | Returns a paginated list of transfers matching the search criteria | [:link:](https://pinpayments.com/developers/api-reference/transfers#search-transfers) | :x: |
190
- | Transfers | GET /transfers/transfer-token | Returns the details of the specified transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfer) | :x: |
191
- | Transfers | GET /transfers/transfer-token/line_items | Returns a paginated list of line items associated with the specified transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfer-line-items) | :x: |
192
- | Webhook Endpoints | POST /webhook_endpoints | Creates a new webhook endpoint | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#post-webhook_endpoints) | :x: |
193
- | Webhook Endpoints | GET /webhook_endpoints | Returns a paginated list of all webhook endpoints | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#get-webhook_endpoints) | :x: |
194
- | Webhook Endpoints | GET /webhook_endpoints/webhook-endpoint-token | Returns the details of the specified webhook endpoint | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#get-webhook_endpoints-token) | :x: |
195
- | Webhook Endpoints | DELETE /webhook_endpoints/webhook-endpoint-token | Deletes a webhook endpoint and all of its webhook requests | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#delete-webhook_endpoints) | :x: |
196
- | Webhooks | GET /webhooks | Returns a paginated list of all webhooks | [:link:](https://pinpayments.com/developers/api-reference/webhooks#get-webhooks) | :x: |
197
- | Webhooks | GET /webhooks/webhook-token | Returns the details of a webhook | [:link:](https://pinpayments.com/developers/api-reference/webhooks#get-webhook) | :x: |
198
- | Webhooks | PUT /webhooks/webhook-token/replay | Replays a webhook | [:link:](https://pinpayments.com/developers/api-reference/webhooks#put-webhook-replay) | :x: |
144
+ | Balance | `GET /balance` | Returns the current balance of your Pin Payments account | [:link:](https://pinpayments.com/developers/api-reference/balance) | :x: |
145
+ | Bank Accounts | `POST /bank_accounts` | Creates a bank account token | [:link:](https://pinpayments.com/developers/api-reference/bank-accounts) | :x: |
146
+ | Cards | `POST /cards` | Securely stores a card's details | [:link:](https://pinpayments.com/developers/api-reference/cards) | :x: |
147
+ | Charges | `POST /charges` | Creates a new charge | [:link:](https://pinpayments.com/developers/api-reference/charges#post-charges) | :heavy_check_mark: |
148
+ | Charges | `PUT /charges/#{charge-token}/capture` | Captures a previously authorised charge | [:link:](https://pinpayments.com/developers/api-reference/charges#put-charges) | :x: |
149
+ | Charges | `GET /charges` | Returns a paginated list of all charges | [:link:](https://pinpayments.com/developers/api-reference/charges#get-charges) | :heavy_check_mark: |
150
+ | Charges | `GET /charges/search` | Returns a paginated list of charges matching the search criteria | [:link:](https://pinpayments.com/developers/api-reference/charges#search-charges) | :heavy_check_mark: |
151
+ | Charges | `GET /charges/#{charge-token}` | Returns the details of a charge | [:link:](https://pinpayments.com/developers/api-reference/charges#get-charge) | :heavy_check_mark: |
152
+ | Customers | `POST /customers` | Creates a new customer | [:link:](https://pinpayments.com/developers/api-reference/customers#post-customers) | :heavy_check_mark: |
153
+ | Customers | `GET /customers` | Returns a paginated list of all customers | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers) | :heavy_check_mark: |
154
+ | Customers | `GET /customers/#{customer-token}` | Returns the details of a customer | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customer) | :heavy_check_mark: |
155
+ | Customers | `PUT /customers/#{customer-token}` | Updates the details of a customer | [:link:](https://pinpayments.com/developers/api-reference/customers#put-customer) | :heavy_check_mark: |
156
+ | Customers | `DELETE /customers/#{customer-token}` | Deletes a customer and all of its cards | [:link:](https://pinpayments.com/developers/api-reference/customers#delete-customer) | :x: |
157
+ | Customers | `GET /customers/#{customer-token}/charges` | Returns a paginated list of a customer's charges | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers-charges) | :heavy_check_mark: |
158
+ | Customers | `GET /customers/#{customer-token}/cards` | Returns a paginated list of a customer's cards | [:link:](https://pinpayments.com/developers/api-reference/customers#get-customers-cards) | :x: |
159
+ | Customers | `POST /customers/#{customer-token}/cards` | Creates an additional card for the specified customer | [:link:](https://pinpayments.com/developers/api-reference/customers#post-customers-cards) | :x: |
160
+ | Customers | `DELETE /customers/#{customer-token}/cards/#{card-token}` | Deletes a customer's non-primary card | [:link:](https://pinpayments.com/developers/api-reference/customers#delete-customers-card) | :x: |
161
+ | Customers | `GET /customers/#{customer-token}/subscriptions` | Retrieves the specified customer's subscriptions | [:link:](https://pinpayments.com/developers/api-reference/customers#customers-subscriptions) | :x: |
162
+ | Events | `GET /events` | Returns a paginated list of all events | [:link:](https://pinpayments.com/developers/api-reference/events#get-events) | :x: |
163
+ | Events | `GET /events/#{event-token}` | Returns the details of the specified event | [:link:](https://pinpayments.com/developers/api-reference/events#get-event) | :x: |
164
+ | Plans | `POST /plans` | Creates a new plan | [:link:](https://pinpayments.com/developers/api-reference/plans#post-plans) | :heavy_check_mark: |
165
+ | Plans | `GET /plans` | Returns a paginated list of all plans | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plans) | :heavy_check_mark: |
166
+ | Plans | `GET /plans/#{plan-token}` | Returns the details of a specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plan) | :heavy_check_mark: |
167
+ | Plans | `PUT /plans/#{plan-token}` | Update the specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#put-plan) | :heavy_check_mark: |
168
+ | Plans | `DELETE /plans/#{plan-token}` | Deletes a plan and all of its subscriptions | [:link:](https://pinpayments.com/developers/api-reference/plans#delete-plan) | :x: |
169
+ | Plans | `POST /plans/#{plan-token}/subscriptions` | Creates a new subscription to the specified plan | [:link:](https://pinpayments.com/developers/api-reference/plans#create-plan-subscription) | :x: |
170
+ | Plans | `GET /plans/#{plan-token}/subscriptions` | Returns a paginated list of subscriptions for a plan | [:link:](https://pinpayments.com/developers/api-reference/plans#get-plan-subscriptions) | :x: |
171
+ | Subscriptions | `POST /subscriptions` | Activate a new subscription and returns its details | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#post-subscriptions) | :heavy_check_mark: |
172
+ | Subscriptions | `GET /subscriptions` | Returns a paginated list of all subscriptions | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#get-subscriptions) | :heavy_check_mark: |
173
+ | Subscriptions | `GET /subscriptions/#{sub-token}` | Returns the details of the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#get-subscription) | :heavy_check_mark: |
174
+ | Subscriptions | `PUT /subscriptions/#{sub-token}` | Updates the card associated with a subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#update-subscription) | :heavy_check_mark: |
175
+ | Subscriptions | `DELETE /subscriptions/#{sub-token}` | Cancels the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#delete-subscription) | :x: |
176
+ | Subscriptions | `PUT /subscriptions/#{sub-token}/reactivate` | Reactivates the subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#reactivate-subscription) | :x: |
177
+ | Subscriptions | `GET /subscriptions/#{sub-token}/ledger` | Fetch the ledger entries relating to a subscription identified by subscription token | [:link:](https://pinpayments.com/developers/api-reference/subscriptions#ledger-subscription) | :heavy_check_mark: |
178
+ | Recipients | `POST /recipients` | Creates a new recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#post-recipients) | :x: |
179
+ | Recipients | `GET /recipients` | Returns a paginated list of all recipients | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipients) | :x: |
180
+ | Recipients | `GET /recipients/#{recipient-token}` | Returns the details of a recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipient) | :x: |
181
+ | Recipients | `PUT /recipients/#{recipient-token}` | Updates the details of a recipient | [:link:](https://pinpayments.com/developers/api-reference/recipients#put-recipient) | :x: |
182
+ | Recipients | `GET /recipients/#{recipient-token}/transfers` | Returns a paginated list of a recipient's transfers | [:link:](https://pinpayments.com/developers/api-reference/recipients#get-recipients-transfers) | :x: |
183
+ | Refunds | `GET /refunds` | Returns a paginated list of all refunds | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-refunds) | :heavy_check_mark: |
184
+ | Refunds | `GET /refunds/#{refund-token}` | Returns the details of the specified refund | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-refund) | :heavy_check_mark: |
185
+ | Refunds | `POST /charges/#{charge-token}/refunds` | Creates a new refund and returns its details | [:link:](https://pinpayments.com/developers/api-reference/refunds#post-refunds) | :heavy_check_mark: |
186
+ | Refunds | `GET /charges/#{charge-token}/refunds` | Returns a list of all refunds for the specified charge | [:link:](https://pinpayments.com/developers/api-reference/refunds#get-token-refunds) | :heavy_check_mark: |
187
+ | Transfers | `POST /transfers` | Creates a new transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#post-transfers) | :x: |
188
+ | Transfers | `GET /transfers` | Returns a paginated list of all transfers | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfers) | :x: |
189
+ | Transfers | `GET /transfers/search` | Returns a paginated list of transfers matching the search criteria | [:link:](https://pinpayments.com/developers/api-reference/transfers#search-transfers) | :x: |
190
+ | Transfers | `GET /transfers/#{transfer-token}` | Returns the details of the specified transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfer) | :x: |
191
+ | Transfers | `GET /transfers/#{transfer-token}/line_items` | Returns a paginated list of line items associated with the specified transfer | [:link:](https://pinpayments.com/developers/api-reference/transfers#get-transfer-line-items) | :x: |
192
+ | Webhook Endpoints | `POST /webhook_endpoints` | Creates a new webhook endpoint | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#post-webhook_endpoints) | :x: |
193
+ | Webhook Endpoints | `GET /webhook_endpoints` | Returns a paginated list of all webhook endpoints | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#get-webhook_endpoints) | :x: |
194
+ | Webhook Endpoints | `GET /webhook_endpoints/#{webhook-endpoint-token}` | Returns the details of the specified webhook endpoint | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#get-webhook_endpoints-token) | :x: |
195
+ | Webhook Endpoints | `DELETE /webhook_endpoints/#{webhook-endpoint-token}` | Deletes a webhook endpoint and all of its webhook requests | [:link:](https://pinpayments.com/developers/api-reference/webhook-endpoints#delete-webhook_endpoints) | :x: |
196
+ | Webhooks | `GET /webhooks` | Returns a paginated list of all webhooks | [:link:](https://pinpayments.com/developers/api-reference/webhooks#get-webhooks) | :x: |
197
+ | Webhooks | `GET /webhooks/#{webhook-token}` | Returns the details of a webhook | [:link:](https://pinpayments.com/developers/api-reference/webhooks#get-webhook) | :x: |
198
+ | Webhooks | `PUT /webhooks/#{webhook-token}/replay` | Replays a webhook | [:link:](https://pinpayments.com/developers/api-reference/webhooks#put-webhook-replay) | :x: |
199
199
 
200
200
  ## Development
201
201
 
@@ -25,6 +25,10 @@ module PR
25
25
  attribute :settlement_currency, Types::Strict::String
26
26
  attribute :metadata, Types::JSON::Hash
27
27
  end
28
+
29
+ def for_customer(customer_token)
30
+ with_base_path("/customers/#{customer_token}/charges")
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -10,8 +10,8 @@ module PR
10
10
  attribute :created_at, Types::JSON::DateTime
11
11
  end
12
12
 
13
- def for_subscription(token)
14
- with_base_path("/subscriptions/#{token}/ledger")
13
+ def for_subscription(subscription_token)
14
+ with_base_path("/subscriptions/#{subscription_token}/ledger")
15
15
  end
16
16
  end
17
17
  end
@@ -13,8 +13,8 @@ module PR
13
13
  attribute :created_at, Types::JSON::DateTime
14
14
  end
15
15
 
16
- def for_charge(token)
17
- with_base_path("/charges/#{token}/refunds")
16
+ def for_charge(charge_token)
17
+ with_base_path("/charges/#{charge_token}/refunds")
18
18
  end
19
19
  end
20
20
  end
@@ -32,6 +32,15 @@ module PR
32
32
  relation.paginate
33
33
  end
34
34
  end
35
+
36
+ def for_customer(customer_token, page: 1, per_page: nil)
37
+ relation = root.for_customer(customer_token).with_params(
38
+ page: page,
39
+ per_page: per_page
40
+ )
41
+
42
+ API::PaginatedResult.wrap(relation) { relation.paginate }
43
+ end
35
44
  end
36
45
  end
37
46
  end
@@ -4,8 +4,8 @@ module PR
4
4
  class Ledger < ROM::Repository[:ledger]
5
5
  struct_namespace PR::Pin::Struct
6
6
 
7
- def for_subscription(token, page: 1, per_page: nil)
8
- relation = root.for_subscription(token).with_params(
7
+ def for_subscription(subscription_token, page: 1, per_page: nil)
8
+ relation = root.for_subscription(subscription_token).with_params(
9
9
  page: page,
10
10
  per_page: per_page
11
11
  )
@@ -19,16 +19,16 @@ module PR
19
19
  API::Result.wrap(relation) { relation.one }
20
20
  end
21
21
 
22
- def create_for_charge(token, *args)
23
- relation = root.for_charge(token)
22
+ def create_for_charge(charge_token, *args)
23
+ relation = root.for_charge(charge_token)
24
24
 
25
25
  API::Result.wrap(relation) do
26
26
  relation.command(:create).call(*args)
27
27
  end
28
28
  end
29
29
 
30
- def for_charge(token, page: 1, per_page: nil)
31
- relation = root.for_charge(token).with_params(
30
+ def for_charge(charge_token, page: 1, per_page: nil)
31
+ relation = root.for_charge(charge_token).with_params(
32
32
  page: page,
33
33
  per_page: per_page
34
34
  )
@@ -1,5 +1,5 @@
1
1
  module PR
2
2
  module Pin
3
- VERSION = '0.7.1'.freeze
3
+ VERSION = '0.7.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pr-pin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - AMHOL
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-21 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler