Class: Stripe::ApplePayDomain

Inherits:
APIResource show all
Extended by:
Stripe::APIOperations::Create, Stripe::APIOperations::List
Includes:
Stripe::APIOperations::Delete
Defined in:
lib/stripe/resources/apple_pay_domain.rb

Overview

Domains registered for Apple Pay on the Web

Defined Under Namespace

Classes: CreateParams, DeleteParams, ListParams, RetrieveParams

Constant Summary collapse

OBJECT_NAME =
"apple_pay_domain"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Stripe::APIOperations::Create

create

Methods included from Stripe::APIOperations::List

list

Methods included from Stripe::APIOperations::Delete

included

Methods inherited from APIResource

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

Methods included from Stripe::APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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

#createdObject (readonly)

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



67
68
69
# File 'lib/stripe/resources/apple_pay_domain.rb', line 67

def created
  @created
end

#deletedObject (readonly)

Always true for a deleted object



77
78
79
# File 'lib/stripe/resources/apple_pay_domain.rb', line 77

def deleted
  @deleted
end

#domain_nameObject (readonly)

Attribute for field domain_name



69
70
71
# File 'lib/stripe/resources/apple_pay_domain.rb', line 69

def domain_name
  @domain_name
end

#idObject (readonly)

Unique identifier for the object.



71
72
73
# File 'lib/stripe/resources/apple_pay_domain.rb', line 71

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



73
74
75
# File 'lib/stripe/resources/apple_pay_domain.rb', line 73

def livemode
  @livemode
end

#objectObject (readonly)

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



75
76
77
# File 'lib/stripe/resources/apple_pay_domain.rb', line 75

def object
  @object
end

Class Method Details

.create(params = {}, opts = {}) ⇒ Object

Create an apple pay domain.



80
81
82
83
84
85
86
87
# File 'lib/stripe/resources/apple_pay_domain.rb', line 80

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/apple_pay/domains",
    params: params,
    opts: opts
  )
end

.delete(domain, params = {}, opts = {}) ⇒ Object

Delete an apple pay domain.



90
91
92
93
94
95
96
97
# File 'lib/stripe/resources/apple_pay_domain.rb', line 90

def self.delete(domain, params = {}, opts = {})
  request_stripe_object(
    method: :delete,
    path: format("/v1/apple_pay/domains/%<domain>s", { domain: CGI.escape(domain) }),
    params: params,
    opts: opts
  )
end

.list(params = {}, opts = {}) ⇒ Object

List apple pay domains.



110
111
112
# File 'lib/stripe/resources/apple_pay_domain.rb', line 110

def self.list(params = {}, opts = {})
  request_stripe_object(method: :get, path: "/v1/apple_pay/domains", params: params, opts: opts)
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/apple_pay_domain.rb', line 12

def self.object_name
  "apple_pay_domain"
end

.resource_urlObject



114
115
116
# File 'lib/stripe/resources/apple_pay_domain.rb', line 114

def self.resource_url
  "/v1/apple_pay/domains"
end

Instance Method Details

#delete(params = {}, opts = {}) ⇒ Object

Delete an apple pay domain.



100
101
102
103
104
105
106
107
# File 'lib/stripe/resources/apple_pay_domain.rb', line 100

def delete(params = {}, opts = {})
  request_stripe_object(
    method: :delete,
    path: format("/v1/apple_pay/domains/%<domain>s", { domain: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end