Class: Stripe::Issuing::Card::TestHelpers

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

Constant Summary collapse

RESOURCE_CLASS =
Card

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

.deliver_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to delivered.



789
790
791
792
793
794
795
796
# File 'lib/stripe/resources/issuing/card.rb', line 789

def self.deliver_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.fail_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to failure.



809
810
811
812
813
814
815
816
# File 'lib/stripe/resources/issuing/card.rb', line 809

def self.fail_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.resource_classObject



784
785
786
# File 'lib/stripe/resources/issuing/card.rb', line 784

def self.resource_class
  "Card"
end

.return_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to returned.



829
830
831
832
833
834
835
836
# File 'lib/stripe/resources/issuing/card.rb', line 829

def self.return_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.ship_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to shipped.



849
850
851
852
853
854
855
856
# File 'lib/stripe/resources/issuing/card.rb', line 849

def self.ship_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.submit_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.



869
870
871
872
873
874
875
876
# File 'lib/stripe/resources/issuing/card.rb', line 869

def self.submit_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

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

Updates the shipping status of the specified Issuing Card object to delivered.



799
800
801
802
803
804
805
806
# File 'lib/stripe/resources/issuing/card.rb', line 799

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

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

Updates the shipping status of the specified Issuing Card object to failure.



819
820
821
822
823
824
825
826
# File 'lib/stripe/resources/issuing/card.rb', line 819

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

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

Updates the shipping status of the specified Issuing Card object to returned.



839
840
841
842
843
844
845
846
# File 'lib/stripe/resources/issuing/card.rb', line 839

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

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

Updates the shipping status of the specified Issuing Card object to shipped.



859
860
861
862
863
864
865
866
# File 'lib/stripe/resources/issuing/card.rb', line 859

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

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

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.



879
880
881
882
883
884
885
886
# File 'lib/stripe/resources/issuing/card.rb', line 879

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