gocardless_pro 2.57.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gocardless_pro/client.rb +3 -3
- data/lib/gocardless_pro/error.rb +3 -3
- data/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +3 -3
- data/lib/gocardless_pro/resources/bank_authorisation.rb +2 -9
- data/lib/gocardless_pro/resources/bank_details_lookup.rb +1 -3
- data/lib/gocardless_pro/resources/billing_request.rb +29 -16
- data/lib/gocardless_pro/resources/billing_request_flow.rb +3 -17
- data/lib/gocardless_pro/resources/billing_request_template.rb +2 -17
- data/lib/gocardless_pro/resources/block.rb +2 -8
- data/lib/gocardless_pro/resources/creditor.rb +2 -20
- data/lib/gocardless_pro/resources/creditor_bank_account.rb +2 -11
- data/lib/gocardless_pro/resources/currency_exchange_rate.rb +1 -4
- data/lib/gocardless_pro/resources/customer.rb +2 -18
- data/lib/gocardless_pro/resources/customer_bank_account.rb +3 -10
- data/lib/gocardless_pro/resources/customer_notification.rb +1 -5
- data/lib/gocardless_pro/resources/event.rb +2 -8
- data/lib/gocardless_pro/resources/export.rb +1 -5
- data/lib/gocardless_pro/resources/instalment_schedule.rb +1 -8
- data/lib/gocardless_pro/resources/institution.rb +1 -6
- data/lib/gocardless_pro/resources/mandate.rb +3 -13
- data/lib/gocardless_pro/resources/mandate_import.rb +1 -4
- data/lib/gocardless_pro/resources/mandate_import_entry.rb +1 -2
- data/lib/gocardless_pro/resources/mandate_pdf.rb +1 -2
- data/lib/gocardless_pro/resources/negative_balance_limit.rb +1 -4
- data/lib/gocardless_pro/resources/payer_authorisation.rb +1 -7
- data/lib/gocardless_pro/resources/payment.rb +2 -13
- data/lib/gocardless_pro/resources/payout.rb +2 -12
- data/lib/gocardless_pro/resources/payout_item.rb +1 -3
- data/lib/gocardless_pro/resources/redirect_flow.rb +2 -10
- data/lib/gocardless_pro/resources/refund.rb +1 -8
- data/lib/gocardless_pro/resources/scheme_identifier.rb +2 -18
- data/lib/gocardless_pro/resources/subscription.rb +2 -20
- data/lib/gocardless_pro/resources/tax_rate.rb +1 -6
- data/lib/gocardless_pro/resources/transferred_mandate.rb +1 -3
- data/lib/gocardless_pro/resources/verification_detail.rb +2 -9
- data/lib/gocardless_pro/resources/webhook.rb +2 -13
- data/lib/gocardless_pro/services/bank_authorisations_service.rb +1 -1
- data/lib/gocardless_pro/services/billing_request_flows_service.rb +1 -1
- data/lib/gocardless_pro/services/billing_request_templates_service.rb +2 -2
- data/lib/gocardless_pro/services/billing_requests_service.rb +13 -11
- data/lib/gocardless_pro/services/blocks_service.rb +3 -3
- data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +2 -2
- data/lib/gocardless_pro/services/creditors_service.rb +2 -2
- data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +3 -3
- data/lib/gocardless_pro/services/customer_notifications_service.rb +1 -1
- data/lib/gocardless_pro/services/customers_service.rb +3 -3
- data/lib/gocardless_pro/services/events_service.rb +1 -1
- data/lib/gocardless_pro/services/exports_service.rb +1 -1
- data/lib/gocardless_pro/services/instalment_schedules_service.rb +3 -3
- data/lib/gocardless_pro/services/institutions_service.rb +1 -1
- data/lib/gocardless_pro/services/mandate_imports_service.rb +3 -3
- data/lib/gocardless_pro/services/mandates_service.rb +4 -4
- data/lib/gocardless_pro/services/payer_authorisations_service.rb +4 -4
- data/lib/gocardless_pro/services/payments_service.rb +4 -4
- data/lib/gocardless_pro/services/payouts_service.rb +2 -2
- data/lib/gocardless_pro/services/redirect_flows_service.rb +2 -2
- data/lib/gocardless_pro/services/refunds_service.rb +2 -2
- data/lib/gocardless_pro/services/scenario_simulators_service.rb +1 -1
- data/lib/gocardless_pro/services/scheme_identifiers_service.rb +1 -1
- data/lib/gocardless_pro/services/subscriptions_service.rb +5 -5
- data/lib/gocardless_pro/services/tax_rates_service.rb +1 -1
- data/lib/gocardless_pro/services/transferred_mandates_service.rb +1 -1
- data/lib/gocardless_pro/services/webhooks_service.rb +2 -2
- data/lib/gocardless_pro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1180067531d66341e77cd81bd3b9e757e26f68b2a48d3a5abfe3da5a429242b4
|
4
|
+
data.tar.gz: eaccc3cea586a9b3a68ea034e22ff173b7caa3fc5af9f67a7c3f748e8bb987da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbb0c59030fa86f1424e933bd7a92f9a3d1fbfff9c299ef40ec16085c650c57f2cd08eab262eb44ffc382c7a239840b15056cd9ada8e98a09c787246163cfe08
|
7
|
+
data.tar.gz: 53dc984d011636663a47cf8df47cabe910f77478baa1be333dec18edad6ebe9379cc42ea9c4939a8ee224a214f2b30eda9a083972a446cacc9532755795c78d8
|
@@ -233,8 +233,8 @@ module GoCardlessPro
|
|
233
233
|
'User-Agent' => "#{user_agent}",
|
234
234
|
'Content-Type' => 'application/json',
|
235
235
|
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
|
236
|
-
'GoCardless-Client-Version' => '
|
237
|
-
}
|
236
|
+
'GoCardless-Client-Version' => '3.1.0'
|
237
|
+
}
|
238
238
|
}
|
239
239
|
end
|
240
240
|
|
@@ -254,7 +254,7 @@ module GoCardlessPro
|
|
254
254
|
comment = [
|
255
255
|
"#{ruby_engine}/#{ruby_version}",
|
256
256
|
"#{RUBY_ENGINE}/#{interpreter_version}",
|
257
|
-
"#{RUBY_PLATFORM}"
|
257
|
+
"#{RUBY_PLATFORM}"
|
258
258
|
]
|
259
259
|
comment << "faraday/#{Faraday::VERSION}"
|
260
260
|
"#{gem_info} #{comment.join(' ')}"
|
data/lib/gocardless_pro/error.rb
CHANGED
@@ -26,7 +26,7 @@ module GoCardlessPro
|
|
26
26
|
{
|
27
27
|
401 => GoCardlessPro::AuthenticationError,
|
28
28
|
403 => GoCardlessPro::PermissionError,
|
29
|
-
429 => GoCardlessPro::RateLimitError
|
29
|
+
429 => GoCardlessPro::RateLimitError
|
30
30
|
}.fetch(code, nil)
|
31
31
|
end
|
32
32
|
|
@@ -35,7 +35,7 @@ module GoCardlessPro
|
|
35
35
|
validation_failed: GoCardlessPro::ValidationError,
|
36
36
|
gocardless: GoCardlessPro::GoCardlessError,
|
37
37
|
invalid_api_usage: GoCardlessPro::InvalidApiUsageError,
|
38
|
-
invalid_state: GoCardlessPro::InvalidStateError
|
38
|
+
invalid_state: GoCardlessPro::InvalidStateError
|
39
39
|
}.fetch(type.to_sym)
|
40
40
|
end
|
41
41
|
|
@@ -45,7 +45,7 @@ module GoCardlessPro
|
|
45
45
|
"code: #{env.status}\n" \
|
46
46
|
"headers: #{env.response_headers}\n" \
|
47
47
|
"body: #{env.body}",
|
48
|
-
'code' => env.status
|
48
|
+
'code' => env.status
|
49
49
|
}
|
50
50
|
end
|
51
51
|
|
@@ -21,15 +21,8 @@ module GoCardlessPro
|
|
21
21
|
# (see Billing Request Flows) to ensure we meet regulatory requirements for
|
22
22
|
# checkout flows.
|
23
23
|
class BankAuthorisation
|
24
|
-
attr_reader :authorisation_type
|
25
|
-
|
26
|
-
attr_reader :created_at
|
27
|
-
attr_reader :expires_at
|
28
|
-
attr_reader :id
|
29
|
-
attr_reader :last_visited_at
|
30
|
-
attr_reader :qr_code_url
|
31
|
-
attr_reader :redirect_uri
|
32
|
-
attr_reader :url
|
24
|
+
attr_reader :authorisation_type, :authorised_at, :created_at, :expires_at, :id, :last_visited_at, :qr_code_url,
|
25
|
+
:redirect_uri, :url
|
33
26
|
|
34
27
|
# Initialize a bank_authorisation resource instance
|
35
28
|
# @param object [Hash] an object returned from the API
|
@@ -12,9 +12,7 @@ module GoCardlessPro
|
|
12
12
|
|
13
13
|
# Look up the name and reachability of a bank account.
|
14
14
|
class BankDetailsLookup
|
15
|
-
attr_reader :available_debit_schemes
|
16
|
-
attr_reader :bank_name
|
17
|
-
attr_reader :bic
|
15
|
+
attr_reader :available_debit_schemes, :bank_name, :bic
|
18
16
|
|
19
17
|
# Initialize a bank_details_lookup resource instance
|
20
18
|
# @param object [Hash] an object returned from the API
|
@@ -10,26 +10,20 @@ module GoCardlessPro
|
|
10
10
|
module Resources
|
11
11
|
# Represents an instance of a billing_request resource returned from the API
|
12
12
|
|
13
|
-
#
|
14
|
-
# customer. An example of required input might be additional customer
|
15
|
-
# billing
|
16
|
-
#
|
17
|
-
# using their mobile banking app.
|
13
|
+
# Billing Requests help create resources that require input or action from
|
14
|
+
# a customer. An example of required input might be additional customer
|
15
|
+
# billing details, while an action would be asking a customer to authorise a
|
16
|
+
# payment using their mobile banking app.
|
18
17
|
#
|
19
18
|
# See [Billing Requests:
|
20
19
|
# Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/)
|
21
|
-
# for how-to's, explanations and tutorials.
|
20
|
+
# for how-to's, explanations and tutorials. <p
|
21
|
+
# class="notice"><strong>Important</strong>: All properties associated with
|
22
|
+
# `subscription_request` and `instalment_schedule_request` are only
|
23
|
+
# supported for ACH and PAD schemes.</p>
|
22
24
|
class BillingRequest
|
23
|
-
attr_reader :actions
|
24
|
-
|
25
|
-
attr_reader :fallback_enabled
|
26
|
-
attr_reader :id
|
27
|
-
attr_reader :mandate_request
|
28
|
-
attr_reader :metadata
|
29
|
-
attr_reader :payment_request
|
30
|
-
attr_reader :purpose_code
|
31
|
-
attr_reader :resources
|
32
|
-
attr_reader :status
|
25
|
+
attr_reader :actions, :created_at, :fallback_enabled, :fallback_occurred, :id, :instalment_schedule_request,
|
26
|
+
:mandate_request, :metadata, :payment_request, :purpose_code, :resources, :status, :subscription_request
|
33
27
|
|
34
28
|
# Initialize a billing_request resource instance
|
35
29
|
# @param object [Hash] an object returned from the API
|
@@ -39,7 +33,9 @@ module GoCardlessPro
|
|
39
33
|
@actions = object['actions']
|
40
34
|
@created_at = object['created_at']
|
41
35
|
@fallback_enabled = object['fallback_enabled']
|
36
|
+
@fallback_occurred = object['fallback_occurred']
|
42
37
|
@id = object['id']
|
38
|
+
@instalment_schedule_request = object['instalment_schedule_request']
|
43
39
|
@links = object['links']
|
44
40
|
@mandate_request = object['mandate_request']
|
45
41
|
@metadata = object['metadata']
|
@@ -47,6 +43,7 @@ module GoCardlessPro
|
|
47
43
|
@purpose_code = object['purpose_code']
|
48
44
|
@resources = object['resources']
|
49
45
|
@status = object['status']
|
46
|
+
@subscription_request = object['subscription_request']
|
50
47
|
@response = response
|
51
48
|
end
|
52
49
|
|
@@ -89,6 +86,14 @@ module GoCardlessPro
|
|
89
86
|
@links['customer_billing_detail']
|
90
87
|
end
|
91
88
|
|
89
|
+
def instalment_schedule_request
|
90
|
+
@links['instalment_schedule_request']
|
91
|
+
end
|
92
|
+
|
93
|
+
def instalment_schedule_request_instalment_schedule
|
94
|
+
@links['instalment_schedule_request_instalment_schedule']
|
95
|
+
end
|
96
|
+
|
92
97
|
def mandate_request
|
93
98
|
@links['mandate_request']
|
94
99
|
end
|
@@ -112,6 +117,14 @@ module GoCardlessPro
|
|
112
117
|
def payment_request_payment
|
113
118
|
@links['payment_request_payment']
|
114
119
|
end
|
120
|
+
|
121
|
+
def subscription_request
|
122
|
+
@links['subscription_request']
|
123
|
+
end
|
124
|
+
|
125
|
+
def subscription_request_subscription
|
126
|
+
@links['subscription_request_subscription']
|
127
|
+
end
|
115
128
|
end
|
116
129
|
end
|
117
130
|
end
|
@@ -14,23 +14,8 @@ module GoCardlessPro
|
|
14
14
|
# payment created for a scheme with strong payer
|
15
15
|
# authorisation (such as open banking single payments).
|
16
16
|
class BillingRequestFlow
|
17
|
-
attr_reader :authorisation_url
|
18
|
-
|
19
|
-
attr_reader :created_at
|
20
|
-
attr_reader :customer_details_captured
|
21
|
-
attr_reader :exit_uri
|
22
|
-
attr_reader :expires_at
|
23
|
-
attr_reader :id
|
24
|
-
attr_reader :language
|
25
|
-
attr_reader :lock_bank_account
|
26
|
-
attr_reader :lock_currency
|
27
|
-
attr_reader :lock_customer_details
|
28
|
-
attr_reader :prefilled_bank_account
|
29
|
-
attr_reader :prefilled_customer
|
30
|
-
attr_reader :redirect_uri
|
31
|
-
attr_reader :session_token
|
32
|
-
attr_reader :show_redirect_buttons
|
33
|
-
attr_reader :show_success_redirect_button
|
17
|
+
attr_reader :authorisation_url, :auto_fulfil, :created_at, :customer_details_captured, :exit_uri, :expires_at,
|
18
|
+
:id, :language, :lock_bank_account, :lock_currency, :lock_customer_details, :prefilled_bank_account, :prefilled_customer, :redirect_uri, :session_token, :show_redirect_buttons, :show_success_redirect_button, :skip_success_screen
|
34
19
|
|
35
20
|
# Initialize a billing_request_flow resource instance
|
36
21
|
# @param object [Hash] an object returned from the API
|
@@ -55,6 +40,7 @@ module GoCardlessPro
|
|
55
40
|
@session_token = object['session_token']
|
56
41
|
@show_redirect_buttons = object['show_redirect_buttons']
|
57
42
|
@show_success_redirect_button = object['show_success_redirect_button']
|
43
|
+
@skip_success_screen = object['skip_success_screen']
|
58
44
|
@response = response
|
59
45
|
end
|
60
46
|
|
@@ -26,23 +26,8 @@ module GoCardlessPro
|
|
26
26
|
# for single-use and is designed to cater to the unique needs of individual
|
27
27
|
# customers.
|
28
28
|
class BillingRequestTemplate
|
29
|
-
attr_reader :authorisation_url
|
30
|
-
|
31
|
-
attr_reader :id
|
32
|
-
attr_reader :mandate_request_currency
|
33
|
-
attr_reader :mandate_request_description
|
34
|
-
attr_reader :mandate_request_metadata
|
35
|
-
attr_reader :mandate_request_scheme
|
36
|
-
attr_reader :mandate_request_verify
|
37
|
-
attr_reader :metadata
|
38
|
-
attr_reader :name
|
39
|
-
attr_reader :payment_request_amount
|
40
|
-
attr_reader :payment_request_currency
|
41
|
-
attr_reader :payment_request_description
|
42
|
-
attr_reader :payment_request_metadata
|
43
|
-
attr_reader :payment_request_scheme
|
44
|
-
attr_reader :redirect_uri
|
45
|
-
attr_reader :updated_at
|
29
|
+
attr_reader :authorisation_url, :created_at, :id, :mandate_request_currency, :mandate_request_description,
|
30
|
+
:mandate_request_metadata, :mandate_request_scheme, :mandate_request_verify, :metadata, :name, :payment_request_amount, :payment_request_currency, :payment_request_description, :payment_request_metadata, :payment_request_scheme, :redirect_uri, :updated_at
|
46
31
|
|
47
32
|
# Initialize a billing_request_template resource instance
|
48
33
|
# @param object [Hash] an object returned from the API
|
@@ -49,14 +49,8 @@ module GoCardlessPro
|
|
49
49
|
# would like to use this API.
|
50
50
|
# </p>
|
51
51
|
class Block
|
52
|
-
attr_reader :active
|
53
|
-
|
54
|
-
attr_reader :created_at
|
55
|
-
attr_reader :id
|
56
|
-
attr_reader :reason_description
|
57
|
-
attr_reader :reason_type
|
58
|
-
attr_reader :resource_reference
|
59
|
-
attr_reader :updated_at
|
52
|
+
attr_reader :active, :block_type, :created_at, :id, :reason_description, :reason_type, :resource_reference,
|
53
|
+
:updated_at
|
60
54
|
|
61
55
|
# Initialize a block resource instance
|
62
56
|
# @param object [Hash] an object returned from the API
|
@@ -18,26 +18,8 @@ module GoCardlessPro
|
|
18
18
|
# Currently, for Anti Money Laundering reasons, any creditors you add must
|
19
19
|
# be directly related to your organisation.
|
20
20
|
class Creditor
|
21
|
-
attr_reader :address_line1
|
22
|
-
|
23
|
-
attr_reader :address_line3
|
24
|
-
attr_reader :bank_reference_prefix
|
25
|
-
attr_reader :can_create_refunds
|
26
|
-
attr_reader :city
|
27
|
-
attr_reader :country_code
|
28
|
-
attr_reader :created_at
|
29
|
-
attr_reader :creditor_type
|
30
|
-
attr_reader :custom_payment_pages_enabled
|
31
|
-
attr_reader :fx_payout_currency
|
32
|
-
attr_reader :id
|
33
|
-
attr_reader :logo_url
|
34
|
-
attr_reader :mandate_imports_enabled
|
35
|
-
attr_reader :merchant_responsible_for_notifications
|
36
|
-
attr_reader :name
|
37
|
-
attr_reader :postal_code
|
38
|
-
attr_reader :region
|
39
|
-
attr_reader :scheme_identifiers
|
40
|
-
attr_reader :verification_status
|
21
|
+
attr_reader :address_line1, :address_line2, :address_line3, :bank_reference_prefix, :can_create_refunds, :city,
|
22
|
+
:country_code, :created_at, :creditor_type, :custom_payment_pages_enabled, :fx_payout_currency, :id, :logo_url, :mandate_imports_enabled, :merchant_responsible_for_notifications, :name, :postal_code, :region, :scheme_identifiers, :verification_status
|
41
23
|
|
42
24
|
# Initialize a creditor resource instance
|
43
25
|
# @param object [Hash] an object returned from the API
|
@@ -23,17 +23,8 @@ module GoCardlessPro
|
|
23
23
|
# <p class="restricted-notice"><strong>Restricted</strong>: This API is not
|
24
24
|
# available for partner integrations.</p>
|
25
25
|
class CreditorBankAccount
|
26
|
-
attr_reader :account_holder_name
|
27
|
-
|
28
|
-
attr_reader :account_type
|
29
|
-
attr_reader :bank_name
|
30
|
-
attr_reader :country_code
|
31
|
-
attr_reader :created_at
|
32
|
-
attr_reader :currency
|
33
|
-
attr_reader :enabled
|
34
|
-
attr_reader :id
|
35
|
-
attr_reader :metadata
|
36
|
-
attr_reader :verification_status
|
26
|
+
attr_reader :account_holder_name, :account_number_ending, :account_type, :bank_name, :country_code, :created_at,
|
27
|
+
:currency, :enabled, :id, :metadata, :verification_status
|
37
28
|
|
38
29
|
# Initialize a creditor_bank_account resource instance
|
39
30
|
# @param object [Hash] an object returned from the API
|
@@ -12,10 +12,7 @@ module GoCardlessPro
|
|
12
12
|
|
13
13
|
# Currency exchange rates from our foreign exchange provider.
|
14
14
|
class CurrencyExchangeRate
|
15
|
-
attr_reader :rate
|
16
|
-
attr_reader :source
|
17
|
-
attr_reader :target
|
18
|
-
attr_reader :time
|
15
|
+
attr_reader :rate, :source, :target, :time
|
19
16
|
|
20
17
|
# Initialize a currency_exchange_rate resource instance
|
21
18
|
# @param object [Hash] an object returned from the API
|
@@ -15,24 +15,8 @@ module GoCardlessPro
|
|
15
15
|
# accounts](#core-endpoints-customer-bank-accounts), which in turn can have
|
16
16
|
# several Direct Debit [mandates](#core-endpoints-mandates).
|
17
17
|
class Customer
|
18
|
-
attr_reader :address_line1
|
19
|
-
|
20
|
-
attr_reader :address_line3
|
21
|
-
attr_reader :city
|
22
|
-
attr_reader :company_name
|
23
|
-
attr_reader :country_code
|
24
|
-
attr_reader :created_at
|
25
|
-
attr_reader :danish_identity_number
|
26
|
-
attr_reader :email
|
27
|
-
attr_reader :family_name
|
28
|
-
attr_reader :given_name
|
29
|
-
attr_reader :id
|
30
|
-
attr_reader :language
|
31
|
-
attr_reader :metadata
|
32
|
-
attr_reader :phone_number
|
33
|
-
attr_reader :postal_code
|
34
|
-
attr_reader :region
|
35
|
-
attr_reader :swedish_identity_number
|
18
|
+
attr_reader :address_line1, :address_line2, :address_line3, :city, :company_name, :country_code, :created_at,
|
19
|
+
:danish_identity_number, :email, :family_name, :given_name, :id, :language, :metadata, :phone_number, :postal_code, :region, :swedish_identity_number
|
36
20
|
|
37
21
|
# Initialize a customer resource instance
|
38
22
|
# @param object [Hash] an object returned from the API
|
@@ -28,16 +28,8 @@ module GoCardlessPro
|
|
28
28
|
# [bank_details_lookups](#bank-details-lookups-perform-a-bank-details-lookup),
|
29
29
|
# before proceeding with creating the accounts
|
30
30
|
class CustomerBankAccount
|
31
|
-
attr_reader :account_holder_name
|
32
|
-
|
33
|
-
attr_reader :account_type
|
34
|
-
attr_reader :bank_name
|
35
|
-
attr_reader :country_code
|
36
|
-
attr_reader :created_at
|
37
|
-
attr_reader :currency
|
38
|
-
attr_reader :enabled
|
39
|
-
attr_reader :id
|
40
|
-
attr_reader :metadata
|
31
|
+
attr_reader :account_holder_name, :account_number_ending, :account_type, :bank_account_token, :bank_name,
|
32
|
+
:country_code, :created_at, :currency, :enabled, :id, :metadata
|
41
33
|
|
42
34
|
# Initialize a customer_bank_account resource instance
|
43
35
|
# @param object [Hash] an object returned from the API
|
@@ -47,6 +39,7 @@ module GoCardlessPro
|
|
47
39
|
@account_holder_name = object['account_holder_name']
|
48
40
|
@account_number_ending = object['account_number_ending']
|
49
41
|
@account_type = object['account_type']
|
42
|
+
@bank_account_token = object['bank_account_token']
|
50
43
|
@bank_name = object['bank_name']
|
51
44
|
@country_code = object['country_code']
|
52
45
|
@created_at = object['created_at']
|
@@ -25,11 +25,7 @@ module GoCardlessPro
|
|
25
25
|
# href="mailto:help@gocardless.com">get in touch</a> if you would like to
|
26
26
|
# use this API.</p>
|
27
27
|
class CustomerNotification
|
28
|
-
attr_reader :action_taken
|
29
|
-
attr_reader :action_taken_at
|
30
|
-
attr_reader :action_taken_by
|
31
|
-
attr_reader :id
|
32
|
-
attr_reader :type
|
28
|
+
attr_reader :action_taken, :action_taken_at, :action_taken_by, :id, :type
|
33
29
|
|
34
30
|
# Initialize a customer_notification resource instance
|
35
31
|
# @param object [Hash] an object returned from the API
|
@@ -17,14 +17,8 @@ module GoCardlessPro
|
|
17
17
|
# corresponding event getting included in API responses. See
|
18
18
|
# [here](#event-actions) for a complete list of event types.
|
19
19
|
class Event
|
20
|
-
attr_reader :action
|
21
|
-
|
22
|
-
attr_reader :customer_notifications
|
23
|
-
attr_reader :details
|
24
|
-
attr_reader :id
|
25
|
-
attr_reader :metadata
|
26
|
-
attr_reader :resource_metadata
|
27
|
-
attr_reader :resource_type
|
20
|
+
attr_reader :action, :created_at, :customer_notifications, :details, :id, :metadata, :resource_metadata,
|
21
|
+
:resource_type
|
28
22
|
|
29
23
|
# Initialize a event resource instance
|
30
24
|
# @param object [Hash] an object returned from the API
|
@@ -12,11 +12,7 @@ module GoCardlessPro
|
|
12
12
|
|
13
13
|
# File-based exports of data
|
14
14
|
class Export
|
15
|
-
attr_reader :created_at
|
16
|
-
attr_reader :currency
|
17
|
-
attr_reader :download_url
|
18
|
-
attr_reader :export_type
|
19
|
-
attr_reader :id
|
15
|
+
attr_reader :created_at, :currency, :download_url, :export_type, :id
|
20
16
|
|
21
17
|
# Initialize a export resource instance
|
22
18
|
# @param object [Hash] an object returned from the API
|
@@ -28,14 +28,7 @@ module GoCardlessPro
|
|
28
28
|
# of collection.
|
29
29
|
#
|
30
30
|
class InstalmentSchedule
|
31
|
-
attr_reader :created_at
|
32
|
-
attr_reader :currency
|
33
|
-
attr_reader :id
|
34
|
-
attr_reader :metadata
|
35
|
-
attr_reader :name
|
36
|
-
attr_reader :payment_errors
|
37
|
-
attr_reader :status
|
38
|
-
attr_reader :total_amount
|
31
|
+
attr_reader :created_at, :currency, :id, :metadata, :name, :payment_errors, :status, :total_amount
|
39
32
|
|
40
33
|
# Initialize a instalment_schedule resource instance
|
41
34
|
# @param object [Hash] an object returned from the API
|
@@ -17,12 +17,7 @@ module GoCardlessPro
|
|
17
17
|
# Not all institutions support both Payment Initiation (PIS) and Account
|
18
18
|
# Information (AIS) services.
|
19
19
|
class Institution
|
20
|
-
attr_reader :autocompletes_collect_bank_account
|
21
|
-
attr_reader :country_code
|
22
|
-
attr_reader :icon_url
|
23
|
-
attr_reader :id
|
24
|
-
attr_reader :logo_url
|
25
|
-
attr_reader :name
|
20
|
+
attr_reader :autocompletes_collect_bank_account, :country_code, :icon_url, :id, :logo_url, :name
|
26
21
|
|
27
22
|
# Initialize a institution resource instance
|
28
23
|
# @param object [Hash] an object returned from the API
|
@@ -16,19 +16,8 @@ module GoCardlessPro
|
|
16
16
|
# GoCardless will notify you via a [webhook](#appendix-webhooks) whenever
|
17
17
|
# the status of a mandate changes.
|
18
18
|
class Mandate
|
19
|
-
attr_reader :authorisation_source
|
20
|
-
|
21
|
-
attr_reader :created_at
|
22
|
-
attr_reader :funds_settlement
|
23
|
-
attr_reader :id
|
24
|
-
attr_reader :metadata
|
25
|
-
attr_reader :next_possible_charge_date
|
26
|
-
attr_reader :next_possible_standard_ach_charge_date
|
27
|
-
attr_reader :payments_require_approval
|
28
|
-
attr_reader :reference
|
29
|
-
attr_reader :scheme
|
30
|
-
attr_reader :status
|
31
|
-
attr_reader :verified_at
|
19
|
+
attr_reader :authorisation_source, :consent_parameters, :consent_type, :created_at, :funds_settlement, :id,
|
20
|
+
:metadata, :next_possible_charge_date, :next_possible_standard_ach_charge_date, :payments_require_approval, :reference, :scheme, :status, :verified_at
|
32
21
|
|
33
22
|
# Initialize a mandate resource instance
|
34
23
|
# @param object [Hash] an object returned from the API
|
@@ -37,6 +26,7 @@ module GoCardlessPro
|
|
37
26
|
|
38
27
|
@authorisation_source = object['authorisation_source']
|
39
28
|
@consent_parameters = object['consent_parameters']
|
29
|
+
@consent_type = object['consent_type']
|
40
30
|
@created_at = object['created_at']
|
41
31
|
@funds_settlement = object['funds_settlement']
|
42
32
|
@id = object['id']
|
@@ -53,10 +53,7 @@ module GoCardlessPro
|
|
53
53
|
# href="mailto:help@gocardless.com">get in touch</a> if you would like to
|
54
54
|
# use this API.</p>
|
55
55
|
class MandateImport
|
56
|
-
attr_reader :created_at
|
57
|
-
attr_reader :id
|
58
|
-
attr_reader :scheme
|
59
|
-
attr_reader :status
|
56
|
+
attr_reader :created_at, :id, :scheme, :status
|
60
57
|
|
61
58
|
# Initialize a mandate_import resource instance
|
62
59
|
# @param object [Hash] an object returned from the API
|
@@ -41,8 +41,7 @@ module GoCardlessPro
|
|
41
41
|
# href="mailto:help@gocardless.com">get in touch</a> if you would like to
|
42
42
|
# use this API.</p>
|
43
43
|
class MandateImportEntry
|
44
|
-
attr_reader :created_at
|
45
|
-
attr_reader :record_identifier
|
44
|
+
attr_reader :created_at, :record_identifier
|
46
45
|
|
47
46
|
# Initialize a mandate_import_entry resource instance
|
48
47
|
# @param object [Hash] an object returned from the API
|
@@ -14,8 +14,7 @@ module GoCardlessPro
|
|
14
14
|
# compliant](#appendix-compliance-requirements) Direct Debit mandates to
|
15
15
|
# your customers.
|
16
16
|
class MandatePdf
|
17
|
-
attr_reader :expires_at
|
18
|
-
attr_reader :url
|
17
|
+
attr_reader :expires_at, :url
|
19
18
|
|
20
19
|
# Initialize a mandate_pdf resource instance
|
21
20
|
# @param object [Hash] an object returned from the API
|
@@ -16,10 +16,7 @@ module GoCardlessPro
|
|
16
16
|
# changed on a per-creditor basis.
|
17
17
|
#
|
18
18
|
class NegativeBalanceLimit
|
19
|
-
attr_reader :balance_limit
|
20
|
-
attr_reader :created_at
|
21
|
-
attr_reader :currency
|
22
|
-
attr_reader :id
|
19
|
+
attr_reader :balance_limit, :created_at, :currency, :id
|
23
20
|
|
24
21
|
# Initialize a negative_balance_limit resource instance
|
25
22
|
# @param object [Hash] an object returned from the API
|
@@ -69,13 +69,7 @@ module GoCardlessPro
|
|
69
69
|
# your servers.
|
70
70
|
# </p>
|
71
71
|
class PayerAuthorisation
|
72
|
-
attr_reader :bank_account
|
73
|
-
attr_reader :created_at
|
74
|
-
attr_reader :customer
|
75
|
-
attr_reader :id
|
76
|
-
attr_reader :incomplete_fields
|
77
|
-
attr_reader :mandate
|
78
|
-
attr_reader :status
|
72
|
+
attr_reader :bank_account, :created_at, :customer, :id, :incomplete_fields, :mandate, :status
|
79
73
|
|
80
74
|
# Initialize a payer_authorisation resource instance
|
81
75
|
# @param object [Hash] an object returned from the API
|
@@ -18,19 +18,8 @@ module GoCardlessPro
|
|
18
18
|
# GoCardless will notify you via a [webhook](#appendix-webhooks) whenever
|
19
19
|
# the state of a payment changes.
|
20
20
|
class Payment
|
21
|
-
attr_reader :amount
|
22
|
-
|
23
|
-
attr_reader :charge_date
|
24
|
-
attr_reader :created_at
|
25
|
-
attr_reader :currency
|
26
|
-
attr_reader :description
|
27
|
-
attr_reader :faster_ach
|
28
|
-
attr_reader :fx
|
29
|
-
attr_reader :id
|
30
|
-
attr_reader :metadata
|
31
|
-
attr_reader :reference
|
32
|
-
attr_reader :retry_if_possible
|
33
|
-
attr_reader :status
|
21
|
+
attr_reader :amount, :amount_refunded, :charge_date, :created_at, :currency, :description, :faster_ach, :fx, :id,
|
22
|
+
:metadata, :reference, :retry_if_possible, :status
|
34
23
|
|
35
24
|
# Initialize a payment resource instance
|
36
25
|
# @param object [Hash] an object returned from the API
|
@@ -17,18 +17,8 @@ module GoCardlessPro
|
|
17
17
|
# Payouts are created automatically after a payment has been successfully
|
18
18
|
# collected.
|
19
19
|
class Payout
|
20
|
-
attr_reader :amount
|
21
|
-
|
22
|
-
attr_reader :created_at
|
23
|
-
attr_reader :currency
|
24
|
-
attr_reader :deducted_fees
|
25
|
-
attr_reader :fx
|
26
|
-
attr_reader :id
|
27
|
-
attr_reader :metadata
|
28
|
-
attr_reader :payout_type
|
29
|
-
attr_reader :reference
|
30
|
-
attr_reader :status
|
31
|
-
attr_reader :tax_currency
|
20
|
+
attr_reader :amount, :arrival_date, :created_at, :currency, :deducted_fees, :fx, :id, :metadata, :payout_type,
|
21
|
+
:reference, :status, :tax_currency
|
32
22
|
|
33
23
|
# Initialize a payout resource instance
|
34
24
|
# @param object [Hash] an object returned from the API
|
@@ -33,9 +33,7 @@ module GoCardlessPro
|
|
33
33
|
# <code>410 Gone</code>.
|
34
34
|
#
|
35
35
|
class PayoutItem
|
36
|
-
attr_reader :amount
|
37
|
-
attr_reader :taxes
|
38
|
-
attr_reader :type
|
36
|
+
attr_reader :amount, :taxes, :type
|
39
37
|
|
40
38
|
# Initialize a payout_item resource instance
|
41
39
|
# @param object [Hash] an object returned from the API
|
@@ -49,16 +49,8 @@ module GoCardlessPro
|
|
49
49
|
# complete an expired redirect flow. For an integrator this is shorter and
|
50
50
|
# they will expire after 10 minutes.
|
51
51
|
class RedirectFlow
|
52
|
-
attr_reader :confirmation_url
|
53
|
-
|
54
|
-
attr_reader :description
|
55
|
-
attr_reader :id
|
56
|
-
attr_reader :mandate_reference
|
57
|
-
attr_reader :metadata
|
58
|
-
attr_reader :redirect_url
|
59
|
-
attr_reader :scheme
|
60
|
-
attr_reader :session_token
|
61
|
-
attr_reader :success_redirect_url
|
52
|
+
attr_reader :confirmation_url, :created_at, :description, :id, :mandate_reference, :metadata, :redirect_url,
|
53
|
+
:scheme, :session_token, :success_redirect_url
|
62
54
|
|
63
55
|
# Initialize a redirect_flow resource instance
|
64
56
|
# @param object [Hash] an object returned from the API
|
@@ -18,14 +18,7 @@ module GoCardlessPro
|
|
18
18
|
# refund is created, and will update the `amount_refunded` property of the
|
19
19
|
# payment.
|
20
20
|
class Refund
|
21
|
-
attr_reader :amount
|
22
|
-
attr_reader :created_at
|
23
|
-
attr_reader :currency
|
24
|
-
attr_reader :fx
|
25
|
-
attr_reader :id
|
26
|
-
attr_reader :metadata
|
27
|
-
attr_reader :reference
|
28
|
-
attr_reader :status
|
21
|
+
attr_reader :amount, :created_at, :currency, :fx, :id, :metadata, :reference, :status
|
29
22
|
|
30
23
|
# Initialize a refund resource instance
|
31
24
|
# @param object [Hash] an object returned from the API
|