Class: Stripe::Issuing::PersonalizationDesign::TestHelpers

Inherits:
APIResourceTestHelpers show all
Defined in:
lib/stripe/resources/issuing/personalization_design.rb

Constant Summary collapse

RESOURCE_CLASS =
PersonalizationDesign

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResourceTestHelpers

custom_method, #initialize, resource_url, #resource_url

Methods included from APIOperations::Request

included

Constructor Details

This class inherits a constructor from Stripe::APIResourceTestHelpers

Class Method Details

.activate(personalization_design, params = {}, opts = {}) ⇒ Object

Updates the status of the specified testmode personalization design object to active.



58
59
60
61
62
63
64
65
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 58

def self.activate(personalization_design, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(personalization_design) }),
    params: params,
    opts: opts
  )
end

.deactivate(personalization_design, params = {}, opts = {}) ⇒ Object

Updates the status of the specified testmode personalization design object to inactive.



78
79
80
81
82
83
84
85
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 78

def self.deactivate(personalization_design, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
    params: params,
    opts: opts
  )
end

.reject(personalization_design, params = {}, opts = {}) ⇒ Object

Updates the status of the specified testmode personalization design object to rejected.



98
99
100
101
102
103
104
105
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 98

def self.reject(personalization_design, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
    params: params,
    opts: opts
  )
end

.resource_classObject



53
54
55
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 53

def self.resource_class
  "PersonalizationDesign"
end

Instance Method Details

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

Updates the status of the specified testmode personalization design object to active.



68
69
70
71
72
73
74
75
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 68

def activate(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

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

Updates the status of the specified testmode personalization design object to inactive.



88
89
90
91
92
93
94
95
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 88

def deactivate(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

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

Updates the status of the specified testmode personalization design object to rejected.



108
109
110
111
112
113
114
115
# File 'lib/stripe/resources/issuing/personalization_design.rb', line 108

def reject(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end