Class: Stripe::SharedPayment::GrantedToken

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/shared_payment/granted_token.rb

Overview

SharedPaymentGrantedToken is the view-only resource of a SharedPaymentIssuedToken, which is a limited-use reference to a PaymentMethod. When another Stripe merchant shares a SharedPaymentIssuedToken with you, you can view attributes of the shared token using the SharedPaymentGrantedToken API, and use it with a PaymentIntent.

Defined Under Namespace

Classes: AgentDetails, PaymentMethodDetails, RiskDetails, TestHelpers, UsageDetails, UsageLimits

Constant Summary collapse

OBJECT_NAME =
"shared_payment.granted_token"

Constants inherited from Stripe::StripeObject

Stripe::StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from Stripe::StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from Stripe::StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#agent_detailsObject (readonly)

Details about the agent that issued this SharedPaymentGrantedToken.



1712
1713
1714
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1712

def agent_details
  @agent_details
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



1714
1715
1716
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1714

def created
  @created
end

#deactivated_atObject (readonly)

Time at which this SharedPaymentGrantedToken expires and can no longer be used to confirm a PaymentIntent.



1716
1717
1718
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1716

def deactivated_at
  @deactivated_at
end

#deactivated_reasonObject (readonly)

The reason why the SharedPaymentGrantedToken has been deactivated.



1718
1719
1720
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1718

def deactivated_reason
  @deactivated_reason
end

#idObject (readonly)

Unique identifier for the object.



1720
1721
1722
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1720

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



1722
1723
1724
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1722

def livemode
  @livemode
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



1724
1725
1726
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1724

def object
  @object
end

#payment_method_detailsObject (readonly)

Details of the PaymentMethod that was shared via this token.



1726
1727
1728
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1726

def payment_method_details
  @payment_method_details
end

#risk_detailsObject (readonly)

Risk details of the SharedPaymentGrantedToken.



1728
1729
1730
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1728

def risk_details
  @risk_details
end

#shared_metadataObject (readonly)

Metadata about the SharedPaymentGrantedToken.



1730
1731
1732
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1730

def 
  @shared_metadata
end

#usage_detailsObject (readonly)

Some details about how the SharedPaymentGrantedToken has been used already.



1732
1733
1734
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1732

def usage_details
  @usage_details
end

#usage_limitsObject (readonly)

Limits on how this SharedPaymentGrantedToken can be used.



1734
1735
1736
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1734

def usage_limits
  @usage_limits
end

Class Method Details

.field_remappingsObject



1787
1788
1789
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1787

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



1777
1778
1779
1780
1781
1782
1783
1784
1785
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1777

def self.inner_class_types
  @inner_class_types = {
    agent_details: AgentDetails,
    payment_method_details: PaymentMethodDetails,
    risk_details: RiskDetails,
    usage_details: UsageDetails,
    usage_limits: UsageLimits,
  }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 10

def self.object_name
  "shared_payment.granted_token"
end

Instance Method Details

#test_helpersObject



1736
1737
1738
# File 'lib/stripe/resources/shared_payment/granted_token.rb', line 1736

def test_helpers
  TestHelpers.new(self)
end