Module: SolidusInter::PaymentMethodSyncable
- Included in:
- InterClientProduction, InterClientSandbox
- Defined in:
- app/models/solidus_inter/inter_client.rb
Instance Attribute Summary collapse
-
#payment_method ⇒ Object
Returns the value of attribute payment_method.
Instance Method Summary collapse
Instance Attribute Details
#payment_method ⇒ Object
Returns the value of attribute payment_method.
10 11 12 |
# File 'app/models/solidus_inter/inter_client.rb', line 10 def payment_method @payment_method end |
Instance Method Details
#initialize(payment_method) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/solidus_inter/inter_client.rb', line 12 def initialize(payment_method) @payment_method = payment_method super( client_id: payment_method.preferred_client_id, client_secret: payment_method.preferred_client_secret, chave_pix: payment_method.preferred_chave_pix, conta_corrente: payment_method.preferred_conta_corrente, crt: temp_file(payment_method.preferred_crt).path, key: temp_file(payment_method.preferred_key).path, access_token: payment_method.preferred_access_token, token_expires_at: payment_method.preferred_token_expires_at&.to_datetime, test_mode: payment_method.preferred_test_mode ) end |
#refresh_token ⇒ Object
27 28 29 30 |
# File 'app/models/solidus_inter/inter_client.rb', line 27 def refresh_token super sync_payment_method_tokens end |