Class: AwsAgcod::CreateGiftCard
- Inherits:
-
Object
- Object
- AwsAgcod::CreateGiftCard
- Extended by:
- Forwardable
- Defined in:
- lib/aws_agcod/create_gift_card.rb
Instance Method Summary collapse
- #claim_code ⇒ Object
- #gc_id ⇒ Object
-
#initialize(request_id, amount) ⇒ CreateGiftCard
constructor
A new instance of CreateGiftCard.
- #request_id ⇒ Object
Constructor Details
#initialize(request_id, amount) ⇒ CreateGiftCard
Returns a new instance of CreateGiftCard.
9 10 11 12 13 14 15 16 17 |
# File 'lib/aws_agcod/create_gift_card.rb', line 9 def initialize(request_id, amount) @response = Request.new("CreateGiftCard", "creationRequestId" => "#{AwsAgcod.config.partner_id}#{request_id}", "value" => { "currencyCode" => "USD", "amount" => amount } ).response end |
Instance Method Details
#claim_code ⇒ Object
19 20 21 |
# File 'lib/aws_agcod/create_gift_card.rb', line 19 def claim_code @response.payload["gcClaimCode"] end |
#gc_id ⇒ Object
23 24 25 |
# File 'lib/aws_agcod/create_gift_card.rb', line 23 def gc_id @response.payload["gcId"] end |
#request_id ⇒ Object
27 28 29 |
# File 'lib/aws_agcod/create_gift_card.rb', line 27 def request_id @response.payload["creationRequestId"] end |