Class: Instamojo::PaymentRequest
- Inherits:
-
Object
- Object
- Instamojo::PaymentRequest
- Includes:
- CommonObject
- Defined in:
- lib/client/payment_request.rb
Overview
"id" => "92e58bd771414d05a5e443b0a85f8b43",
"phone" => "+919999999999",
"email" => "[email protected]",
"buyer_name" => "John Doe",
"amount" => "2500",
"purpose" => "FIFA 16",
"status" => "Pending",
"send_sms" => true,
"send_email" => true,
"sms_status" => "Pending",
"email_status" => "Pending",
"shorturl" => nil,
"longurl" => "https://www.instamojo.com/@ashwini/92e58bd771414d05a5e443b0a85f8b43",
"redirect_url" => "http://www.example.com/redirect/",
"webhook" => "http://www.example.com/webhook/",
"created_at" => "2015-10-07T21:36:34.665Z",
"modified_at" => "2015-10-07T21:36:34.665Z",
"allow_repeated_payments" => false
Instance Attribute Summary collapse
-
#allow_repeated_payments ⇒ Object
Returns the value of attribute allow_repeated_payments.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#buyer_name ⇒ Object
Returns the value of attribute buyer_name.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#email_status ⇒ Object
Returns the value of attribute email_status.
-
#id ⇒ Object
Returns the value of attribute id.
-
#longurl ⇒ Object
Returns the value of attribute longurl.
-
#modified_at ⇒ Object
Returns the value of attribute modified_at.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#purpose ⇒ Object
Returns the value of attribute purpose.
-
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
-
#send_email ⇒ Object
Returns the value of attribute send_email.
-
#send_sms ⇒ Object
Returns the value of attribute send_sms.
-
#shorturl ⇒ Object
Returns the value of attribute shorturl.
-
#sms_status ⇒ Object
Returns the value of attribute sms_status.
-
#status ⇒ Object
Returns the value of attribute status.
-
#webhook ⇒ Object
Returns the value of attribute webhook.
Instance Method Summary collapse
-
#initialize(payment_request, client) ⇒ PaymentRequest
constructor
A new instance of PaymentRequest.
- #to_s ⇒ Object
Methods included from CommonObject
#assign_values, #construct_hash, included, #reload, #reload!, #to_h, #to_json
Constructor Details
#initialize(payment_request, client) ⇒ PaymentRequest
Returns a new instance of PaymentRequest.
34 35 36 37 |
# File 'lib/client/payment_request.rb', line 34 def initialize(payment_request, client) assign_values(payment_request) @client = client # Reference to client end |
Instance Attribute Details
#allow_repeated_payments ⇒ Object
Returns the value of attribute allow_repeated_payments.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def allow_repeated_payments @allow_repeated_payments end |
#amount ⇒ Object
Returns the value of attribute amount.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def amount @amount end |
#buyer_name ⇒ Object
Returns the value of attribute buyer_name.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def buyer_name @buyer_name end |
#created_at ⇒ Object
Returns the value of attribute created_at.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def created_at @created_at end |
#email ⇒ Object
Returns the value of attribute email.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def email @email end |
#email_status ⇒ Object
Returns the value of attribute email_status.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def email_status @email_status end |
#id ⇒ Object
Returns the value of attribute id.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def id @id end |
#longurl ⇒ Object
Returns the value of attribute longurl.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def longurl @longurl end |
#modified_at ⇒ Object
Returns the value of attribute modified_at.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def modified_at @modified_at end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
30 31 32 |
# File 'lib/client/payment_request.rb', line 30 def original @original end |
#phone ⇒ Object
Returns the value of attribute phone.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def phone @phone end |
#purpose ⇒ Object
Returns the value of attribute purpose.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def purpose @purpose end |
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def redirect_url @redirect_url end |
#send_email ⇒ Object
Returns the value of attribute send_email.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def send_email @send_email end |
#send_sms ⇒ Object
Returns the value of attribute send_sms.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def send_sms @send_sms end |
#shorturl ⇒ Object
Returns the value of attribute shorturl.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def shorturl @shorturl end |
#sms_status ⇒ Object
Returns the value of attribute sms_status.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def sms_status @sms_status end |
#status ⇒ Object
Returns the value of attribute status.
27 28 29 |
# File 'lib/client/payment_request.rb', line 27 def status @status end |
#webhook ⇒ Object
Returns the value of attribute webhook.
28 29 30 |
# File 'lib/client/payment_request.rb', line 28 def webhook @webhook end |
Instance Method Details
#to_s ⇒ Object
39 40 41 42 |
# File 'lib/client/payment_request.rb', line 39 def to_s sprintf("Instamojo PaymentRequest(id: %s, purpose: %s, amount: %s, status: %s, shorturl: %s, longurl: %s)", id, purpose, amount, status, shorturl, longurl) end |