Class: CheckoutSdk::Payments::GooglePayClient
- Inherits:
-
Client
- Object
- Client
- CheckoutSdk::Payments::GooglePayClient
show all
- Defined in:
- lib/checkout_sdk/payments/google_pay/google_pay_client.rb
Overview
Client for the Google Pay endpoints. All endpoints require OAuth.
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary
collapse
Constructor Details
#initialize(api_client, configuration) ⇒ GooglePayClient
Returns a new instance of GooglePayClient.
16
17
18
|
# File 'lib/checkout_sdk/payments/google_pay/google_pay_client.rb', line 16
def initialize(api_client, configuration)
super(api_client, configuration, CheckoutSdk::AuthorizationType::OAUTH)
end
|
Instance Method Details
#enroll_entity(enrollment_request) ⇒ Object
21
22
23
24
25
|
# File 'lib/checkout_sdk/payments/google_pay/google_pay_client.rb', line 21
def enroll_entity(enrollment_request)
api_client.invoke_post(build_path(GOOGLEPAY, ENROLLMENTS),
sdk_authorization,
enrollment_request)
end
|
#get_enrollment_state(entity_id) ⇒ Object
42
43
44
45
|
# File 'lib/checkout_sdk/payments/google_pay/google_pay_client.rb', line 42
def get_enrollment_state(entity_id)
api_client.invoke_get(build_path(GOOGLEPAY, ENROLLMENTS, entity_id, STATE),
sdk_authorization)
end
|
#get_registered_domains(entity_id) ⇒ Object
36
37
38
39
|
# File 'lib/checkout_sdk/payments/google_pay/google_pay_client.rb', line 36
def get_registered_domains(entity_id)
api_client.invoke_get(build_path(GOOGLEPAY, ENROLLMENTS, entity_id, DOMAINS),
sdk_authorization)
end
|
#register_domain(entity_id, domain_request) ⇒ Object
29
30
31
32
33
|
# File 'lib/checkout_sdk/payments/google_pay/google_pay_client.rb', line 29
def register_domain(entity_id, domain_request)
api_client.invoke_post(build_path(GOOGLEPAY, ENROLLMENTS, entity_id, DOMAIN),
sdk_authorization,
domain_request)
end
|